Doug,
Sorry to be so late to the party, but this works well:
#!/usr/bin/perl
$tldn='(com|net|edu|gov|int|mil|org|biz|name|coop|aero|info|[a-z][a-z])';
while(chomp($line=<>)) {
while($line =~ m{<(\w[-.\w]*\@[-a-z0-9]+(\.[-a-z0-9]+)*\.$tldn)>}g) {
print $1 . "\n";
}
}
Thanks to J. Friedl, Mastering Regular Expressions, for the email matching
regex.
Enjoy,
Matt
On Jan 26, 2011, at 9:15 AM, Christopher Stone wrote:
>
> I'm sure one of the Perl guys will offer a nicely terse solution, [...]
:)
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>