I'm way rusty on my regexp's (been on vacation for a month without doing
any) but try this:

$s =~ m/^([^,]+),\s*(\".+\>),(.+)/;

$1 will be "[EMAIL PROTECTED]"
$2 will be '"Blow, Joe" <[EMAIL PROTECTED]>'
$3 will be "Joe Blow <[EMAIL PROTECTED]>"

This will work as long as all the lines are in the format you gave
earlier:
$s = '[EMAIL PROTECTED], "Blow, Joe" <[EMAIL PROTECTED]>,Joe Blow
<[EMAIL PROTECTED]>';

If not, lemme know and I'll do my best (or somebody else will I'm sure)
to come up with something a bit more forgiving.  This regexp is really
ugly and mean.

Brian Johnson
Partner/Systems Administrator/Programmer
Source1Hosting.tv, LLC (www.source1hosting.tv)
Source1Results.com, LLC (www.source1results.com)
I may be insane, but remember - The only
difference between an insane man and a
genius is his jacket.

> 
> Brian wrote:
> > 
> > This seems like more of a job for regexp than for split.  
> Is there any
> > reason not to use regexp in your particular case?
> > 
> 
> I'd love to use a regex, but can you come up with one that
> works?  I haven't been able to...
> 
> Thanks,
> 
> -Mike
> 
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to