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

```ts
const VAR_REFERENCE: Regex<"var\\(\\s*(?<name>--[\\w-]+)", {
  flags: "gu";
  names: {
     name: string;
  };
}>;
```

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

Custom Property Variable Reference Pattern
Matches `var(--name)` patterns.
Used to track consumed custom properties.

## Example

```ts
VAR_REFERENCE.exec("var(--primary-color)")?.groups?.name // "--primary-color"
```
