Skip to content

patternCapture

patternCapture(pattern, name?): string

Defined in: packages/core/src/pattern/pattern-util.ts:12

Enclose the pattern with a capture group, optionally named with name

If name is not provided, the capture group will be non-capturing.

string

The pattern to be captured.

string

Optional name for the capture group.

string

The pattern string enclosed in a capture group.