Type alias RegularExpressionFlags

RegularExpressionFlags: `${EmptyString | "g"}${EmptyString | "i"}${EmptyString | "m"}${EmptyString | "s"}u`

Possible combinations of regular expression flags (with mandatory u flag).

Remarks

Type union stricter than string type for RegExp flags. The unicode flag is mandatory to ensure unicode characters are always supported.

Example

const flags1: RegularExpressionFlags = "u";
const flags2: RegularExpressionFlags = "gu";
const flags3: RegularExpressionFlags = "iu";
const flags4: RegularExpressionFlags = "giu";

See

Regular Expressions