in reply to scripty email address regex stuff
and maybe:local $/ = undef; my $raw = <FILE>; $raw =~ s/[\r\n]//g; $raw =~ s/;\s+//g; my @list = split /;/, $raw;
but the second regex also throws away some legal addesses like "user!host1!host2!host3"foreach (@list) { s/^[^<>]+<([^<>]+)>$/$1/; # or: s/^[^<>]+<([^<>\s]+@[^<>\s]+)>$/$1/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: scripty email address regex stuff
by mkahn (Beadle) on Oct 16, 2003 at 15:50 UTC | |
by mkahn (Beadle) on Oct 16, 2003 at 19:30 UTC |