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/; }
In reply to Re: scripty email address regex stuff
by Beechbone
in thread scripty email address regex stuff
by mkahn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |