in reply to Regexp: How to match in middle but not the ends?
Not being a regex expert, I've come up with this:
my $string = '---LL--C----LCSH-------CSHL-------LCSLH-------LCCHLSHCL- +---'; while ($string =~ /([CHS][LCHS]+[CHS])/xg) { print "$1\n"; } __END__ CSH CSH CSLH CCHLSHC
--
David Serrano
|
|---|