in reply to Re^2: Another regex to solve ...
in thread Another regex to solve ...

/((\b|[^aeiou])[aeiou]|[eiou]a|[aiou]e|[aeou]i|[aeiu]o|[aeio]u)p\b/

but it's not even remotely elegant. I'll keep working on it.

Replies are listed 'Best First'.
Re^4: Another regex to solve ...
by pat_mc (Pilgrim) on Aug 18, 2011 at 16:50 UTC
    Hm ... yes, of course ... the explicit disjunction would work. I guess we both agree on the elegance of this solution (or lack thereof) ;-)

    Thanks for posting it, nonetheless!

      Two regexes work:

      $w =~ /([aeiou])p\b/ && $w !~ /${1}${1}p\b/