in reply to Common RegExps

The regex for a syntactically valid email address is about a full screenfull. Ditto for a URL. And IP addresses are better checked algorithmically, not statically as text.

So what problem are you really solving, for which you got to the step "use a regex". Perhaps you should back up a step. {grin}

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: Re: Common RegExps
by Anonymous Monk on Aug 01, 2000 at 02:22 UTC
    Well, I was looking for something that parses xyz@somewhere.something.com. Rules such as valid characters in the username, and the ip-address, and also to get the TLD etc. What I did not know was that one can have nested structures in the email address, and that of course maikes it context free. Well, if thats the case, at least is there any module which checks for the validity of email addresses ? mb
      Yeah, there's a couple of email address parsing routines in the CPAN. search.cpan.org is having hissyfits right now or I'd give you the exact reference, but check under "email" or "RFC822" or something.

      -- Randal L. Schwartz, Perl hacker