in reply to Splitting only on internal pattern, not at start or end of string
The pattern for split isn't terribly complicated either:
Update: /[^N]\KN++\B/ with a \K will also work, as long as you don't capture the gaps.my @contigs = split /(?<=[^N])N++\B/, $sequence{$key};
|
---|
In Section
Seekers of Perl Wisdom