I need to look to see if it appears in a page, but not count its appearance in the page footer. How can I match a word, and specify not to match if it contains certain surrounding text?
EG: I want to match "foo", but not when the match is "only by foo".
I tried a few derivations of /[only by] (f|F)oo/, but if the last letter of the previous word matches any of those letters, it doesn't work.
TIA