Home > @rushstack/node-core-library > Text > escapeRegExp
Text.escapeRegExp() method
Escapes a string so that it can be treated as a literal string when used in a regular expression.
Signature:
static escapeRegExp(literal: string): string;
Parameters
| Parameter | Type | Description |
|---|---|---|
| literal | string |
Returns:
string