[wellylug] Regex question
Darryl Hamilton
wellylug at addict.net.nz
Fri Jun 3 13:55:32 NZST 2005
Hi
Does anyone know if this is possible in a single regex? (I'm guessing
not, but it can't hurt to ask)
What I'm wanting to do is match any email address with MAILER-DAEMON or
postmaster but only if the domain isn't a 'whitelisted' one.
(mailer-daemon or postmaster) @ (anything except 'domain.co.nz')
I got as far as this
/(MAILER-DAEMON|postmaster)@!(domain\.co\.nz)/ (takes ! as a matchable
character)
/(MAILER-DAEMON|postmaster)@(domain\.co\.nz)?/ (zero or one, close but
not close enough)
/(MAILER-DAEMON|postmaster)@(domain\.co\.nz)??/ (supposedly valid, but
couldn't get it to work either)
Anyone got any ideas, or am I expecting too much? :)
d.
More information about the wellylug
mailing list