I'm performing simple text search/replace on random HTML pages in jQuery, but I'm having issues ignoring terms that appear within an attribute, i.e. if my term is `jquery`, I would like to ignore all terms in ` jquery` while still hitting the one outside. Right now my code looks a little like this:
I've been looking at positive/negative lookahead/lookbehind, but I can't get it down right. I'm not able to use any external libraries besides jQuery, and I've seen [this post](https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags) already.
I suppose one solution could be to use some indexOf magic to search the sections I want, but I don't know if this is efficient or feasible for quick text searching.
Any suggestions would be greatly appreciated! What about the terms inside the tags?