in reply to Re: Re: Strip user-defined words with regexp
in thread Strip user-defined words with regexp
which does exactly what I was looking for. I only tried to do it in one regexp.my $firstWord = undef; my $secondWord = undef; my $i = 0; while ($message =~ /([A-Za-z0-9]+)/g) { if ($i == 0) { $firstWord = $1; } elsif ($i == 1) { $secondWord = $1; last; } $i++; }
|
|---|