Tags

links:
http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word
http://stackoverflow.com/questions/116819/regular-expression-to-exclude-set-of-keywords
http://www.myezapp.com/apps/dev/regexp/show.ws (regex analyzer)
https://www.debuggex.com/
http://stackoverflow.com/questions/5671409/regular-expression-gui
http://www.rexegg.com/regex-lookarounds.html

summary:
– negative lookahead (?!your_neg_pattern)
– use ^( )*$ warp around the whole neg lookahead to consume the whole line once matched, ^ is to start from the beginning. In a way, this is to “avoid” a match for this line.

Advertisements