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
In reply to Re: Regexp: How to match in middle but not the ends?
by Hue-Bond
in thread Regexp: How to match in middle but not the ends?
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |