in reply to Re^3: Splitting only on internal pattern, not at start or end of string
in thread Splitting only on internal pattern, not at start or end of string
If you want to use split, you need to apply lookbehind and lookahead assertions in the regex, to keep the letters A, G, C and T out of the match:
(Waiting for AnomalousMonks expert answer...)my @info = split /(?<=[ATGC])N+(?=[ATGC])/, $line;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Splitting only on internal pattern, not at start or end of string
by AnomalousMonk (Archbishop) on Jan 16, 2014 at 23:07 UTC | |
|
Re^5: Splitting only on internal pattern, not at start or end of string
by robby_dobby (Hermit) on Jan 16, 2014 at 10:25 UTC |