If I understood your question clearly, here is my solution. You can use negative look behind regex and split function to accomplsh it. TIMTOWTDI.
$string = 'APADPKGSTIDRPDAARTLTVHKCEQTDTRGVKEGTRNEDPQAECKPVSDVEFTITKLN +VD'; @arr = split /(?<!P)(K|R)/, $string; print @arr; output: ------- APADPKGSTIDRPDAARTLTVHKCEQTDTRGVKEGTRNEDPQAECKPVSDVEFTITKLNVD
Take a look at perlre and split function.
Prasad
In reply to Re: cleaving a sequence with specific alphabets
by prasadbabu
in thread cleaving a sequence with specific alphabets
by heidi
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |