Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^6: cleaving a sequence with specific alphabets

by mwah (Hermit)
on May 21, 2008 at 17:21 UTC ( #687804=note: print w/replies, xml ) Need Help??


in reply to Re^5: cleaving a sequence with specific alphabets
in thread cleaving a sequence with specific alphabets

Oh well, I made a mistake (better really test the code next time).

I couldn't come up with a solution dropping the .*?, so Tachyon-II's solution only needs a slight modification ...

... my @arr = $string =~ / .*? [KR] (?!P) | [^KR]+$ /gx; ...

... for getting the strings tail.

Thanks for checking this!

Regards

mwa

Replies are listed 'Best First'.
Re^7: cleaving a sequence with specific alphabets
by tachyon-II (Chaplain) on May 22, 2008 at 00:04 UTC

    That'll learn me ;-) Testing OPs code and not my own! Thanks for fixing it and pointing out you don't need the ( ).

    cheers

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2021-04-12 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?