in reply to Please evaluate: RegEx for validating e-mail addresses
Please guys, let me make some statements here, since I was apparently misunderstood:
I've understood Ovid's post, davido and really appreciated his contribution (as usual), but I'd like to *learn* to build a regex for that matter.
Just because a "standard" way of building it exists it's not unmutable, e.g.:
Ovid first allows a whitespace and/or tab to be in the beginning of the e-mail address:
The *only thing* I want to do is to validate an e-mail address (not something like "My name <myemail@myserver.com>") using a regex built by *me*. I want to learn that. I don't care if there is a module that already has this implemented. I don't care if there is a "generally accepted" way of doing it. I want to do it myself because I want to understand the full concept of it and then learn from it.
All I've wanted was some advices and tips on how to do it and some critcics on my regex.
So far in this node, only Ovid provided me that (with the link to the RFC and the addresses examples fom Mastering Regular Expressions).
Cheers,
I've understood Ovid's post, davido and really appreciated his contribution (as usual), but I'd like to *learn* to build a regex for that matter.
Just because a "standard" way of building it exists it's not unmutable, e.g.:
Ovid first allows a whitespace and/or tab to be in the beginning of the e-mail address:
I wouldn't do that. *My* line of thinking and the logic that reigns on the app I'm coding is: if the user has entered a whitespace in the beginning of the webform field, well, too bad for him. Even better, I'd write a JS function to disable whitespaces on that field. Since it's a web app it's better for me (and most probably for the user) to do it this way.[\040\t]*
The *only thing* I want to do is to validate an e-mail address (not something like "My name <myemail@myserver.com>") using a regex built by *me*. I want to learn that. I don't care if there is a module that already has this implemented. I don't care if there is a "generally accepted" way of doing it. I want to do it myself because I want to understand the full concept of it and then learn from it.
All I've wanted was some advices and tips on how to do it and some critcics on my regex.
So far in this node, only Ovid provided me that (with the link to the RFC and the addresses examples fom Mastering Regular Expressions).
Cheers,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Please evaluate: RegEx for validating e-mail addresses
by FoxtrotUniform (Prior) on Sep 25, 2004 at 20:33 UTC | |
•Re^2: Please evaluate: RegEx for validating e-mail addresses
by merlyn (Sage) on Sep 25, 2004 at 20:28 UTC | |
by FoxtrotUniform (Prior) on Sep 25, 2004 at 20:40 UTC | |
by merlyn (Sage) on Sep 25, 2004 at 20:44 UTC | |
by tachyon (Chancellor) on Sep 26, 2004 at 07:26 UTC |
In Section
Seekers of Perl Wisdom