/me crosses off www.perlskripts.com from "list of places to get good information about Perl scripting" and adds to "list of places to raise eyebrows about if mentioned in a thread".
| [reply] |
Man, what a load of crap. First of all, it's perfectly valid for an email address to contain a newline character. Just stick a backslash in front of it, or put it inside quotes.
Second, a dot matches any character that's not a newline,
but only outside a character class. [.\S] matches the same as [BigPurpleRats\S]. Your regex can also be written much simpler: /^\S+\@\S\.\w+/. Which isn't a very useful regex - it's not even anchored at the end. But it rejects valid regexes, and accepts invalid ones. And yeah, your regex rejects '@.com' as an email address,
but it accepts '.@..com'. Yippy.
Abigail | [reply] [d/l] [select] |