From: Harry Kakueki Date: 2008-07-13T06:34:09+09:00 Subject: Re: regular expressions help On Sun, Jul 13, 2008 at 3:20 AM, Vivek wrote: > Hi, > How do I split the below string into words..Words can be either a > consecutive set of non whitespace characters or anything withn " " > > 'hi hello "hello world" hey yo' > > should return > [hi, hello, hello world,hey,yo] > > require 'shellwords' include Shellwords str = 'hi hello "hello world" hey yo' p shellwords(str) Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/ruby/list.html