RegExpConstructor
interface · experimental
interface RegExpConstructorMethods
escape
escape(string: string): stringReturns a new string in which characters that are potentially special in a regular expression pattern are replaced with escape sequences.
string: stringThe string to escape.