Function: Regex()
ts
function Regex(pattern, description?): TypeFunction<string>;Defined in: packages/parser/src/flag-types.ts:65
Creates a regex type function that validates the input against the provided pattern.
Parameters
| Parameter | Type | Description |
|---|---|---|
pattern | RegExp | The regular expression pattern to validate against |
description? | string | Optional description for display purposes |
Returns
TypeFunction<string>
A TypeFunction that validates the input value
Throws
If the value does not match the regex pattern

