(str: string): string Escapes a string for literal matching in a RegExp.
str
type
stringreturns
string 2 declarations
(str: string): string Escapes a string for literal matching in a RegExp.
strstringstring <T extends RegExp>(regexp: T): T Reset a RegExp's lastIndex to 0 for global and sticky patterns. Ensures consistent behavior by clearing state that affects subsequent matches.
regexpTT