in reply to Re^2: Why my Regex doesn't work
in thread Why my Regex doesn't work

Yeah. The problem seems underspecified.

For example, what output would the OP want from CHCHC?

AnomalousMonk's snippet outputs CCCHC, while anonymonk's gives CCHCC...