in reply to Re^2: regexp to only allow for formally valid email addresses
in thread regexp to only allow for formally valid email addresses
Unless you don't think the character classes are a bit redundant. I assume fraktalisman only wants to match \w as well as '-' and '.' since its for e-mail addresses.
# my guess is that he's not trying to do this =~ /^[.]+@[.]+$/ # either of these make more sense for matching an e-mail address =~ /^[a-zA-Z_\-\.0-9]+@[a-zA-Z_\-\.0-9]+$/ =~ /^[\w\-\.]+@[\w\-\.]+$/
Or am I missing something painfully obvious?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: regexp to only allow for formally valid email addresses
by Thelonius (Priest) on Mar 07, 2007 at 20:54 UTC |