View Single Post
Old 03-10-2010, 02:02 PM   #8
Pie
Gone and done
 
Join Date: Sep 2001
Posts: 4,808
I think the issue is with the regex: what you have written will allow
someone@abc.com
but not
someone@mailserver.abc.com

Try modding the regexp to something like
/\@[\w+\.]*abc\.com/

You are also missing escapes for the periods, so my version escapes the @-sign, the period(s) and allows for an arbitrary number of subdomain steps.

I love regex.
__________________
per·son \ˈpər-sən\ (noun) - an ephemeral collection of small, irrational decisions
The fun thing about evolution (and science in general) is that it happens whether you believe in it or not.
Pie is offline   Reply With Quote