in reply to Regexp: How to match in middle but not the ends?
The result is this:my $string = '---LL--C----LCSH-------CSHL-------LCSLH-------LCCHLSHCL- +---'; @patterns = $string =~ /([^-L][LCSH]*[^-L])/g; print join ', ', @patterns;
CSH, CSH, CSLH, CCHLSHC
Is that what you were looking for?
--marmot
|
|---|