Interface RegExpStatic

Index

Methods

Methods

public escape(str: string): string

Escapes all RegExp tokens in a string.

example

RegExp.escape('really?') -> 'really\?' RegExp.escape('yes.') -> 'yes.' RegExp.escape('(not really)') -> '(not really)'

Parameters

  • str: string

    Escape RegExp tokens in this string.

Returns

string

Escaped RegExp tokens in .