Pattern matching the regex metacharacters that have to be escaped before a search pattern can safely be compiled as a RegExp.
final Pattern SPECIAL_CHARS_REGEX = RegExp(r'[-\[\]/{}()*+?.\\^$|]');