in reply to Re: Regexp: How to match in middle but not the ends?
in thread Regexp: How to match in middle but not the ends?

/[CSH][CSHL]+?/ doesn't work. It would incorrectly match "CL" in "---CL---", and it will never match more than two characters.

/[CSH][CSHL]*[CSH]/ works.

If there wasn't a two character minimum, we'd have to use zero-width lookaheads and/or lookbehinds.