refactor(compiler): refactor code matching helpers for compliance spec (#22835)
PR Close #22835
This commit is contained in:

committed by
Matias Niemelä

parent
49396ca2ae
commit
129bb1800b
@ -114,6 +114,7 @@ export function getParseErrors(error: Error): ParseError[] {
|
||||
return (error as any)[ERROR_PARSE_ERRORS] || [];
|
||||
}
|
||||
|
||||
// Escape characters that have a special meaning in Regular Expressions
|
||||
export function escapeRegExp(s: string): string {
|
||||
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
||||
}
|
||||
|
Reference in New Issue
Block a user