Options
All
  • Public
  • Public/Protected
  • All
Menu

Module string/escapeRegExp

Index

References

Functions

References

Renames and re-exports escapeRegExp

Functions

  • escapeRegExp(str?: string): string
  • Escapes the RegExp special characters "^", "$", "", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in string.

    example
     escapeRegExp('[test](utils)'); // => '\[test\]\(utils\)'
    

    Parameters

    • str: string = ''

      The string to escape.

    Returns string

    Returns the escaped string.

Generated using TypeDoc