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
In reply to Re: Another regex to solve ...
by johngg
in thread Another regex to solve ...
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |