Sorry - try again with proper formatting ;-)


It works - but its not precise.  It is saying

Match "                                    : "
Match anynumber of chars that are not "    : [^"]*
Match @                                    : @
Match anynumber of chars that are not "    : [^"]*
Match "                                    : "

By any number - I also mean 0 - hence one of the problems...


,"[\w\d._]+@[\w\d.\-]+"$

is a more precise (though by no means complete) solution for your
current issue (tested with perl but the theory is sound)


Match a comma then double quote                            : ,"
Match any number (but at least 1) letter, word, . or _     : [\w\d._]+
Match @                                                    : @
Match any number (but at least 1) letter, word, . or -     : [\w\d.\-]+
Match " followed by end of line                            : "$

As you can see - you can adapt this one to allow more things (or
disallow them).  Matching valid email addresses is not an easy task for
a single regex.

HTH

Greeno
-- 
Greeno <[EMAIL PROTECTED]>
GnuPG Key :  1024D/B5657C8B 
Key fingerprint = 9ED8 59CC C161 B857 462E  51E6 7DFB 465B B565 7C8B

Imagine working in a secure environment and finding the string 
_NSAKEY in the OS binaries without a good explanation
    -Alan Cox 04/05/2001

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to