From: Siep Korteling Date: 2008-09-29T07:45:10+09:00 Subject: Re: Counting Tabs and splitting by that number Nick Bo wrote: > Basically i have a document which I am opening and then i am reading (...) > > I know there is alot in my message so here is a summary: > > HOW TO COUNT \t IN A STRING THEN SPLIT BY THAT NUMBER OF \t Split on \t anyway and dump all empty results, like this: str = 'beep+xml\t\t\t atom' res = str.split('\t').reject{|item|item.empty?} p res hth, Siep -- Posted via http://www.ruby-forum.com/.