Escapes the a string of any special regexp characters.
function regexpEscape(str: string): string
str:string
The string to escape.
The string with special regexp characters escaped.
import { regexpEscape } from 'utils/regexp';
console.log(regexpEscape('(foo)')); // Outputs: '\(foo\)'
console.log(regexpEscape('foo$bar^')); // Outputs: 'foo\$bar\^'