Re: CODE: Regexp/email check

From: Torgny 'Artovil' Bjers (artovil@unmade.com)
Date: 06/07/01


At 12:21 2001-06-07 -0700, Daniel A. Koepke wrote:
>If your platform doesn't have a regular expression library available by
>default, you'll have to find one.  I don't know any off the top of my
>head, but that's why the gods made Google.  A quick search revealed the
>Perl Compatible Regular Expression library, which appears to be portable
>and powerful, if a bit overkill for just matching needs:
>
>   http://www.pcre.org/
>
>Point to be made: regular expressions are probably overkill for almost
>everything you'd want to do with your Mud.  What are you trying to do,
>exactly?  There's probably a considerably more concise way to pull it off
>than by using regex.

To be exact, I want to do this:
/^[#-'*+\-/-9\=\?a-z\^\_\`\{\}\~](\.{0,1}[#-'*+\-/-9\=\?a-z\^\_\`\{\}\~])*@([A-Za-z0-9_]+\.{1})+[A-Za-z]{2}[A-Za-z]*$/

Id est, check the email to see if it is a valid email address.

If there is another way to check the email address that the user input upon
character creation than to check it like this with a reg exp, then I am
very interested in hearing about it.  If not, then I will try to use what
you told me about.

Are there any good C reference pages online that I can read about regexp,
and other C functions for that matter, please email them to me since I am
dying for online reference.

Kind regards,
Torgny

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST