escapeRegExp function
Implementation
escapeRegExp(String string) {
return string.isNotEmpty && reHasRegExpChar.hasMatch(string)
? string.replaceAll(reRegExpChar, '\\\$&')
: string;
}
escapeRegExp(String string) {
return string.isNotEmpty && reHasRegExpChar.hasMatch(string)
? string.replaceAll(reRegExpChar, '\\\$&')
: string;
}