[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: a simple command that splits up a string into numbers and letters

Dan Diebolt

2/5/2009 6:53:00 AM

[Note: parts of this message were removed to make it a legal post.]

This is pretty close to what you want except for the first null

> '34JKBY103dfd878dsf78s78s'.split(/(\d+)/)
=> ["", "34", "JKBY", "103", "dfd", "878", "dsf", "78", "s", "78", "s"]