From: Daniel Waite Date: 2007-09-28T09:05:40+09:00 Subject: Re: Break apart a string by kind of characters Gavin Kistner wrote: > irb(main):001:0> s = 'a1000aa' > => "a1000aa" > irb(main):002:0> s.split( /(\d+)/ ) > => ["a", "1000", "aa"] WOW! Freakin' awesome! One caveat... irb(main):004:0> '11aa1000aaa'.split(/(\d+)/) => ["", "11", "aa", "1000", "aaa"] For some reason it answers with a blank element, but I'm sure that's an easy one to solve. Thanks, Gavin! -- Posted via http://www.ruby-forum.com/.