On 10/23/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 might be somebody's attempt at matching an e-mail address. But it
fails to match many valid addresses, while not excluding all invalid
ones. In other words, it makes both false positive and false negative
errors. If, of course, that's what it's intended to do.

If you're working on the program, you could try to determine whether
there's a better way to verify an e-mail address (such as sending an
activation code to it, then waiting for the owner of the address to
use that code).

> it will be a great help if
> some one could give a breakdown on the this regex.

Have you seen YAPE::Regex::Explain?

    http://search.cpan.org/dist/YAPE-Regex-Explain/

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

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


Reply via email to