You won't need capturing parentheses when evaluating in list context. Afaik does the .*? invoke a speed penalty, so that the expression might be optimized as:
... my @arr = $string =~ / [^KR]+ # collect non K|R . # the following must be K|R (?!P) # ignore if fragment would start by P /gsx; ...
Regards
mwa
In reply to Re^3: cleaving a sequence with specific alphabets
by mwah
in thread cleaving a sequence with specific alphabets
by heidi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |