---
url: /reference/packages/regex/src/namespaces/CssdocLocalPatterns/variables/BEM_ELEMENT.md
---
# Variable: BEM_ELEMENT

```ts
const BEM_ELEMENT: Regex<"\\.(?<block>[\\w-]+)__(?<element>[\\w-]+)", {
  flags: "gu";
  names: {
     block: string;
     element: string;
  };
}>;
```

Defined in: [packages/regex/src/tiers/cssdoc-local.ts:209](https://github.com/thedannywahl/cssdoc/blob/main/packages/regex/src/tiers/cssdoc-local.ts#L209)

BEM Element Pattern
Matches BEM double underscore element syntax: `.block__element`
Used to extract block and element parts from compound selectors.

## Example

```ts
BEM_ELEMENT.exec(".button__icon")?.groups // { block: "button", element: "icon" }
```
