in reply to Words, no consecutive doubled letters but repeated letters

You already know how to do the A and B part with backreferences (it's even straight forward with named captures called A and B)

The harder part is to exclude repetition in c..efghijh

... one way is repeated negative look-aheads, another splitting and counting.

We had a similar question just recently: Nonrepeating characters in an RE

You'll find these and many other helpful suggestions discussed there!

HTH! :)

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

PS:

> abCCdEEfgh ... and D stands for the 6th and 7th letter position

I think you meant E