R
Richard Anderson
I am trying to feed a regular expression to a mail processing program that
matches every string except a specific string. For example, I want a regex
that does not match (e-mail address removed) but matches any other
string. If I were writing a Perl program, I would just do this:
if ($address !~ /^richard\@richard-anderson\.org$/) { print "Spam\n" }
but I am not able to modify the source code of the program I am using.
I haven't been able to do this using the complement metacharacter (^). I'd
accept a solution that matches anything except an anagram of
(e-mail address removed)
P.S. This is actually a Python regex, but Python's regexes are very similar
to Perl's regexes.
matches every string except a specific string. For example, I want a regex
that does not match (e-mail address removed) but matches any other
string. If I were writing a Perl program, I would just do this:
if ($address !~ /^richard\@richard-anderson\.org$/) { print "Spam\n" }
but I am not able to modify the source code of the program I am using.
I haven't been able to do this using the complement metacharacter (^). I'd
accept a solution that matches anything except an anagram of
(e-mail address removed)
P.S. This is actually a Python regex, but Python's regexes are very similar
to Perl's regexes.