http://www.perlmonks.org?node_id=360917


in reply to Simple e-mail validation

Your regexp looks like it includes spaces as valid characters.

-Theo-
(so many nodes and so little time ... )

Replies are listed 'Best First'.
Re: Simple e-mail validation
by Abigail-II (Bishop) on Jun 04, 2004 at 15:09 UTC
    Sounds like a good thing to me! Spaces are allowed in email addresses. Any regexp that doesn't allow for spaces won't be correct.

    Abigail

      Well, slap me silly! I've never seen that!
      Are there some systems that disallow spaces? (trying to figure out where I got that idea...)

      Update: Thanks, Abigail.

      -Theo-
      (so many nodes and so little time ... )

        Are there some systems that disallow spaces?
        Any MTA that doesn't allow sending mail with addresses that contain spaces is not RFC compliant. But every site is free to decide what its policy is for creating email addresses. A site could decide to only allow vowels, or forbid letters or spaces in email addresses.

        Abigail