I would do it this way. I don't know if it deserves an high grade, but it gets the job done :).
my $count = 0; while ( $message =~ /([A-Za-z0-9]+)/g) { last if $count++ > 1; print "$1\n"; }
In reply to Re: Strip user-defined words with regexp
by rnahi
in thread Strip user-defined words with regexp
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |