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...
In reply to Re^3: Why my Regex doesn't work
by Not_a_Number
in thread Why my Regex doesn't work
by flappygoat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |