in reply to Parsing data that may or may not be CSV
Parsing email addresses with a regex is not easy, Mail::Address should help.
For splitting the list,
The (?:..) construct is for grouping only, without setting $1. It's used to prevent split from inserting separators as extra array elements. A character class of whitespace and comma could be used instead.my @addresses = split /(?:\s|,)+/, $cgi->param('addresses');
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parsing data that may or may not be CSV
by BlueLines (Hermit) on Apr 19, 2002 at 18:28 UTC |