You searched for the word(s):
< 1 second(s)
I love regular expressions. I would love to be an active contributer to this forum. Unfortunately, the software which runs this forum is wholely unusable. I joined up and contributed a few solutions, but will be leaving now due to the bugs in the UI.
Its unfortunate, because there are very few forums on the internet which are dedicated to ...
And replace it with this:
Point 1: What mash says about character classes is very true. (Your Regex almost worked by sheer dumb luck!) 2: by using a lookahead, you can avoid needing to run the regex through twice (i.e. don't actually match the second <LI>, just look ahead and make sure that it is there). Here is a regex which works for your test data:
Actually, to find a whole line containing a word, the regex would be:
To find a line that does not contain a specified word, use negative lookahead like so:
Of course this is assuming you are using a tool that supports negative lookahead (you didn't say what tool/platform you are using - please read ...