From: "David A. Black" Date: 2008-07-13T06:43:58+09:00 Subject: Re: regular expressions help Hi -- On Sun, 13 Jul 2008, phlip wrote: >>>> should return >>>> [hi, hello, hello world,hey,yo] > >> But this returns "hello world" as two entries, not one as required. > > The "should return" clause is not well-formed anyway... On the (usually misappropriated, but hopefully not here) Occam's Razor principle[1], I would refrain from positing that there's actually supposed to be a comma between the second "hello" and "world", or that the quotation marks that were removed to illustrate the results are actually supposed to be reinstated as literals. We can wait for a ruling from Vivek, though; he's now got just about every permutation to choose from :-) (Including shellwords, thanks to Harry, and that of course is the best. Or at least, if Occam is right, then Harry is right :-) David [1] http://pespmc1.vub.ac.be/occamraz.html (yes, it's still "Link To Something Other Than Wikipedia!" Week [barely]) -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails July 21-24 Edison, NJ Advancing With Rails August 18-21 Edison, NJ See http://www.rubypal.com for details and updates!