print join ', ', $string =~ /([CSH][CSHL]+[CSH])/g;matches at least 3 characters and thus should be print join ', ', $string =~ /([CSH][CSHL]*[CSH])/g; (as you mention somewhere else in this thread).
-- Hofmator
In reply to Re^2: Regexp: How to match in middle but not the ends?
by Hofmator
in thread Regexp: How to match in middle but not the ends?
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |