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

```ts
const PSEUDO_CLASS: Regex<":(?<name>[\\w-]+)(?:\\((?<arg>[^)]*)\\))?", {
  flags: "u";
  names: {
     arg?: string;
     name: string;
  };
}>;
```

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

Pseudo-Class Pattern
Matches pseudo-class selectors like `:hover`, `:focus`, `:not(...)`
Used for state and hover/focus condition extraction.

## Example

```ts
PSEUDO_CLASS.exec(":hover")?.groups?.name // "hover"
PSEUDO_CLASS.exec(":not(.disabled)")?.groups?.name // "not"
PSEUDO_CLASS.exec(":not(.disabled)")?.groups?.arg // ".disabled"
```
