in reply to Yet Another Email Validation question

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
•Re: Re: Yet Another RE for email address
by merlyn (Sage) on Apr 07, 2004 at 13:03 UTC
    /me crosses off www.perlskripts.com from "list of places to get good information about Perl scripting" and adds to "list of places to raise eyebrows about if mentioned in a thread".

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Yet Another Email Validation question
by Abigail-II (Bishop) on Apr 06, 2004 at 19:49 UTC
    Man, what a load of crap. First of all, it's perfectly valid for an email address to contain a newline character. Just stick a backslash in front of it, or put it inside quotes. Second, a dot matches any character that's not a newline, but only outside a character class. [.\S] matches the same as [BigPurpleRats\S]. Your regex can also be written much simpler: /^\S+\@\S\.\w+/. Which isn't a very useful regex - it's not even anchored at the end. But it rejects valid regexes, and accepts invalid ones. And yeah, your regex rejects '@.com' as an email address, but it accepts '.@..com'. Yippy.

    Abigail

    A reply falls below the community's threshold of quality. You may see it by logging in.