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

```ts
const BEM_BLOCK: Regex<"\\.(?<block>[A-Za-z_][\\w-]*)", {
  flags: "u";
  names: {
     block: string;
  };
}>;
```

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

BEM Block Pattern
Matches a CSS class selector that is exactly one class (the component block).
Used to identify the main documented component's class.

## Example

```ts
BEM_BLOCK.exec(".button")?.groups?.block // "button"
BEM_BLOCK.exec(".my-component")?.groups?.block // "my-component"
```
