>perl -wMstrict -le "my $text = q{hello to 'all' this perl-monk's friends}; my $wchar = qr{ [A-Za-z'-] }xms; my $word = qr{ (?<! $wchar) $wchar+ }xms; while ($text =~ m{ (?= ($word \s+ $word)) }xmsg) { print $1 } " hello to to 'all' 'all' this this perl-monk's perl-monk's friends
In reply to Re^2: Regexp matching words, not doing what I expect
by AnomalousMonk
in thread Regexp matching words, not doing what I expect
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |