I'm working with ruby with the
match
http://website1.com/url_with_some_words.html
http://website2.com/url_with_some_other_words.html
http://website3.com/url_with_the_word_dog.html
dog
Just use a negative lookahead ^(?!.*dog).*$
.
Explanation
^
: match begin of line(?!.*dog)
: negative lookahead, check if the word dog doesn't exist.*
: match everything (except newlines in this case)$
: match end of line