Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Parsing data that may or may not be CSV

by BlueLines (Hermit)
on Apr 19, 2002 at 18:28 UTC ( [id://160626]=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing data that may or may not be CSV
in thread Parsing data that may or may not be CSV

This doesn't work either:
#!/usr/bin/perl use Data::Dumper; my $addresses = ' foo@foo.com bar@bar.com, foo@foobar.com bar@foo.com , bar@foobar.com '; my @addresses = split /(?:\s|,)+/, $addresses; print Dumper \@addresses;
produces:
$VAR1 = [ '', 'foo@foo.com', 'bar@bar.com', 'foo@foobar.com', 'bar@foo.com', 'bar@foobar.com' ];
I agree that parsing email addresses via a regex is next to impossible, but fortunately for me I'm not required to verify the addresses :-)

BlueLines

Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://160626]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-29 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found