SPUG: Regex that matches everything except a specific string

ced at carios2.ca.boeing.com ced at carios2.ca.boeing.com
Thu Nov 6 13:52:42 CST 2003


> if ( $address =~ /.*(?<!richard at richard-anderson\.org$/ ) {
>     print "ok\n";
> } else {
>     print "spam";
> }

Make that:

if ( $address =~ /.*(?<!richard\@richard\-anderson\.org)$/ ) {
    print "spam\n";
} else {
    print "ok";
}

--
Charles DeRykus



More information about the spug-list mailing list