From: shawn bright Date: 2009-02-05T16:02:03+09:00 Subject: Re: a simple command that splits up a string into numbers and letters --0016368e1d8a3a136b0462267d43 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit way cool, thanks, all -sk On Thu, Feb 5, 2009 at 12:46 AM, DanDiebolt.exe wrote: > I got it on the first try with this split! > > irb> '34JKBY103dfd878dsf78s78s'.split(/([a-zA-Z]+)(?=[0-9])/) > => ["34", "JKBY", "103", "dfd", "878", "dsf", "78", "s", "78s"] > > the first set of parens is capturing while the second set of parents is a > zero width positive look ahead > > --0016368e1d8a3a136b0462267d43--