Type alias RegularExpression

RegularExpression: `/${string}/${RegularExpressionFlags}`

String representing a regular expression.

Remarks

Safer than string and simpler than RegExp type to represent a regular expression. It RegularExpression to enforce flags to always have u and have a consistent order.

Example

const regex: RegularExpression = "/^[a-z]+$/u";

See