in reply to Another regex to solve ...
I've not done much testing but this seems to work by putting the capture in the look-behind.
knoppix@Microknoppix:~$ perl -E ' > for ( qw{ soap creep top groat loop } ) > { > say unless m{(?<=([aeiou]))\1p\z}; > }' soap top groat knoppix@Microknoppix:~$
I hope this is helpful.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Another regex to solve ...
by Not_a_Number (Prior) on Aug 18, 2011 at 23:34 UTC | |
by johngg (Canon) on Aug 19, 2011 at 17:38 UTC | |
|
Re^2: Another regex to solve ...
by pat_mc (Pilgrim) on Aug 19, 2011 at 19:35 UTC |