My experience with regular expressions is limited and I\'ve been reading various tutorials and posts on negation and negative lookahead, etc, but nothing seems to quite matc
Turn the problem around: a character can be followed by at most 3 of the same. Then it must be followed by something else. Finally, the whole string must consist of sequences like this. In the perl flavor: