Perl regex engine has support for (*SKIP) since version 5.010; so you could write:
/(.)\1((?!\1)|\1*(*SKIP)(*FAIL))/
In reply to Re^2: Using regex to match double letters, and only double letters
by Anonymous Monk
in thread Using regex to match double letters, and only double letters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |