Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: cleaving a sequence with specific alphabets

by BrowserUk (Patriarch)
on May 21, 2008 at 11:21 UTC ( [id://687748]=note: print w/replies, xml ) Need Help??


in reply to cleaving a sequence with specific alphabets

Like this (before a K or R not followed by P)

print for split '(?=[KR][^P])', 'APADPKGSTIDRPDAARTLTVHKCEQTDTRGVKEGTRNEDPQAECKPVSDVEFTITKLNVD';; APADP KGSTIDRPDAA RTLTVH KCEQTDT RGV KEGT RNEDPQAECKPVSDVEFTIT KLNVD

Or maybe like this (After a K or R not followed by P):

print for split '(?<=[KR](?!P))', 'APADPKGSTIDRPDAARTLTVHKCEQTDTRGVKEGTRNEDPQAECKPVSDVEFTITKLNVD';; APADPK GSTIDRPDAAR TLTVHK CEQTDTR GVK EGTR NEDPQAECKPVSDVEFTITK LNVD

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://687748]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found