in reply to Split at specific spaces
Another way just using a global match with an alternation of look-behinds rather than split.
$ perl -E ' $_ = q{1 AC2 34 TRP A 6 ALA A 7 ILE A 14 GLY A 15}; say for m{(?: (?<=\A) | (?<=\s) )( (?:\S+\s+){2} \S+ ) }gx;' 1 AC2 34 TRP A 6 ALA A 7 ILE A 14 GLY A 15 $
I hope this is useful.
Cheers,
JohnGG
|
|---|