in reply to Splitting only on internal pattern, not at start or end of string

The problem appears when I also have Ns at the beginning or end of the sequence
So, remove the N's at the beginning and at the end, and use your old algorithm:
$sequence =~ s/^N+|N+$//g;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re: Splitting only on internal pattern, not at start or end of string
  • Download Code

Replies are listed 'Best First'.
Re^2: Splitting only on internal pattern, not at start or end of string
by hdb (Monsignor) on Jan 16, 2014 at 15:37 UTC

    This is the one issue in this thread: the OP has not specified if he wants to keep leading and trailing Ns or whether he wants to have them removed. Some answers assume the former, others the latter....