http://qs321.pair.com?node_id=1213014


in reply to Re: Using regex to match double letters, and only double letters
in thread Using regex to match double letters, and only double letters

Perl regex engine has support for (*SKIP) since version 5.010; so you could write:

/(.)\1((?!\1)|\1*(*SKIP)(*FAIL))/