I have a regex to avoid all special characters in the search bar. This works great, however I cannot get it to work with layers. For example, with haystack
add +
or
add (+)
and needle
+
regular expression /\+/gimatches "+". However, the regular expression /\b\+/gidoes not have. Any ideas on how to make this work?
Using
add (plus)
like a haystack and /\bplus/gias a regular expression, it corresponds to a fine. I just can't understand why runaway characters have problems.
source
share