From: fedzor Date: 2008-01-31T04:45:04+09:00 Subject: Re: Parsing a string with quotes On Jan 30, 2008, at 2:28 PM, Cheri Ruska wrote: > I am trying to parse out the string: > > My dog "ate" my "math homework" and "my cat" > > into the array: > > [My, dog, ate, my, math homework, and, my cat] > > Does anybody know a good way to do this? require "shellwords" string = 'My dog "ate" my "math homework" and "my cat"' array = Shellwords.shellwords string p array HTH