Re: Assigning pattern matches to an array
- From: "Paul Lalli" <mritty@xxxxxxxxx>
- Date: 30 Dec 2006 14:25:00 -0800
Graham Stow wrote:
Emaill::Address doesn't grab me
Done a quick test between
use Email::Address
push(@matches, Email::Address->parse($line));
and
push(@matches, $line=~/\b[.-\w]*@[-\w]*\.+[-\w]*\.*[-\w]*\b/g);
The latter pulled up a number of correct email address, while the former
pulled these up plus other stuff that weren't true email addresses
Says you. I trust Email::Address's belief of what a "true" email
address is a hell of a lot better than yours. Just because they don't
look like what you might consider "normal" addresses doesn't mean they
aren't valid. Email::Address follows the RFC. Your handrolled
solution does not.
Paul Lalli
.
- Follow-Ups:
- Re: Assigning pattern matches to an array
- From: Gunnar Hjalmarsson
- Re: Assigning pattern matches to an array
- References:
- Assigning pattern matches to an array
- From: Graham Stow
- Re: Assigning pattern matches to an array
- From: Uri Guttman
- Re: Assigning pattern matches to an array
- From: Graham Stow
- Re: Assigning pattern matches to an array
- From: DJ Stunks
- Re: Assigning pattern matches to an array
- From: Graham Stow
- Assigning pattern matches to an array
- Prev by Date: [Announce] ClieOp2psv
- Next by Date: Re: perl -V in 5.8.8 doesn't add architecture dependent directories?
- Previous by thread: Re: Assigning pattern matches to an array
- Next by thread: Re: Assigning pattern matches to an array
- Index(es):