I am trying to build a regular expression such that every link that is not to www.example.com links in a new window. I think this would give me everything that does link to it. How would I get everything that does not?
(http:\/\/)?(www\.)?example\.(com|net|gov|org)
(?!(http:\/\/)?(www\.)example\.(com|net|gov|org))(http:\/\/)?(www\.).*\.(com|net|gov|org)http://regexr.com?30nfp
Does that work?