Here's my position on this.

Randal is a very respected member of the Perl community, but in this case I think his response was a bit extreme, especially as it didn't spell out *why* he was so annoyed.

First of all, what's "The FAQ"? Perl, and the various version of Perl, have a lot of different FAQs.

In this case, Randal was referring to the general Perl FAQ, sub-section "How do I check a valid mail address?"

http://www.perldoc.com/perl5.8.0/pod/perlfaq9.html

which is, somewhat confusingly, not in the regex FAQ, is about checking the *validity* of addresses, and starts with a blunt statement that it's impossible.

The whole thing is pretty much in the context of "I've been given an address -- how do I tell if it's valid?", and it does indeed address serious issues, which not many people know about, because email addresses can take a number of different and obscure forms and still be valid.

However, Sara didn't want to check the validity of email addresses. All the addresses she wanted to fix were valid, known to her, and presumably in one of the more normal forms, as in [EMAIL PROTECTED] -- if Sara had said "I want to match email addresses in the form '[EMAIL PROTECTED]' and replace the '@' symbol", then I submit that the solutions would have been just fine.

Randal's right, people should read the FAQ. Everyone go and read it right now. But the FAQ entry he mentioned doesn't directly address the problem at hand, and the solution promised would almost certainly have sufficed.

I wish someone had answered more like this:

--------

The following regex [regex] will find most normal '[EMAIL PROTECTED]' email addresses -- but please, if you haven't, read the FAQ, [address] because this is *not* a regex that will match every valid email address.

----------

jh

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to