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

Re: Split a string based on change of character

by moritz (Cardinal)
on Jul 28, 2007 at 08:04 UTC ( [id://629265]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MData::Dumper -wle '$Data::Dumper::Indent=0; $_="aaabbc"; prin
    +t Dumper([split m/(?<=(.))(?!\1)/]);'
    $VAR1 = ['aaa','a','bb','b','c','c'];
    

Log In?
Username:
Password:

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

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

    No recent polls found