Matching a repeated character in regex is simple with a backreference:
(.)\1
However, I would like to match the character after the pair of characters, so I thought I could simply put this in a lookbehind:
(?<=(.)\1).
Unfortunately, this doesn't match anything.
Why is that? In other flavours I wouldn't be surprised because there are strong restrictions on lookbehinds, but .NET usually supports arbitrarily complicated patterns inside lookbehinds.