Is there a simple way to ignore the white space in a target string when searching for matches using a regular expression pattern? For example, if my search is for \"cats\",
If you only want to allow spaces, then
\bc *a *t *s\b
should do it. To also allow tabs, use
\bc[ \t]*a[ \t]*t[ \t]*s\b
Remove the \b anchors if you also want to find cats within words like bobcats or catsup.
\b
cats
bobcats
catsup