Yes,this is a regex for email matching,but may be broken under some cases.

The username part can be all a-z,A-Z,0-9, "-", "." and "_" characters.
The first tld part (before the ".") take the same character range as username.
the last tld part (after the ".") can be a-z and A-Z only,and the
length is from 2 to 5.

In fact this is not an exact regex for email address,b/c it also match
the cases below:

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

and even,
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


There is an article on internet "How to Find or Validate an Email Address".
I didn't check it carefully,but just a reference for you.
http://www.regular-expressions.info/email.html


On 10/24/07, newBee <[EMAIL PROTECTED]> wrote:
> ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$
>
> Its look like an email address... is it..? it will be a great help if
> some one could give a breakdown on the this regex.
>
> thanks in advance...
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to