in reply to Regexp: How to match in middle but not the ends?
EDIT: Oops, missed that.$_ = '---LL--C----LCSH-------CSHL-------LCSLH-------LCCHLSHCL----'; while (m/([A-Z]+)/g) { ($s = $1) =~ s/^L+|L+$//g; print "$s\n" if $s; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexp: How to match in middle but not the ends?
by ikegami (Patriarch) on Jul 30, 2006 at 18:41 UTC |