> Subject: testing on email characters 

I just wanted to expand on Jeff Yoaks comment that the regexes discussed in
this thread don't actually validate syntax on _all_ e-mail addresses.  I
think this is a common problem.  I remember looking this up in 'Mastering
Regular Expressions' (though I don't have it with me now) and the author
commented that a regex to do this would be over a thousand characters long.
You can take a look at RFC 822 to get an idea for the uncommon characters
allowed in e-mail addresses (like '& <>"').  

I've never used Email::Valid but it may be a good way to solve the problem,
I'd be impressed if it actually catches all valid addresses (and very
happy).  I've always just accepted that there would be some special cases
that wouldn't be caught and put other mechanisms in place to handle those.

'Just 2 bits'
Peter C.

Reply via email to