Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Split a string based on change of character (also)

by tye (Cardinal)
on Jul 28, 2007 at 07:41 UTC ( #629262=note: print w/ replies, xml ) Need Help??


in reply to Split a string based on change of character

my $str= "AAABBCCCC"; my @x; push @x, $1 while $str =~ /((.)\2*)/g;

- tye        


Comment on Re: Split a string based on change of character (also)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2014-07-29 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls