Skip to content

Home > sculp-js > escapeRegExp

escapeRegExp() function

转义所有特殊字符

Signature:

typescript
export declare function escapeRegExp(str: string): string;

Parameters

Parameter

Type

Description

str

string

原字符串 reference: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Regular\_expressions

Returns:

string

string

Released under the MIT License.