From: Mark Woodward Date: 2006-01-11T19:53:05+09:00 Subject: Re: Finding a sentence (more than one word & punctuation (, . ;))in a string? Mark Woodward wrote: .... > > # x seemed to include empty strings so only add x to the array if not "" > foo.split(/\s*<[^<>]*>\s*/).reject{|x| a.insert(-1,x) if x != ""} Hmm, here's the first improvement? Seems I can use a << x to append to an array: # x seemed to include ""??? so only add x to the array if not "" foo.split(/\s*<[^<>]*>\s*/).reject{|x| a << x if x != ""} -- Mark