Regex - how to tell something NOT to match?

Posted by Jake Petroules on Stack Overflow See other posts from Stack Overflow or by Jake Petroules
Published on 2010-06-03T16:12:06Z Indexed on 2010/06/03 16:14 UTC
Read the original article Hit count: 420

Filed under:

How can I create a regex NOT to match something? For example I want to regex to match everything that is NOT the string "www.petroules.com".

I tried [^www\.petroules\.com] but that didn't seem to work.

© Stack Overflow or respective owner

Related posts about regex