From: ara howard Date: 2008-01-31T04:43:19+09:00 Subject: Re: Parsing a string with quotes On Jan 30, 2008, at 12:28 PM, Cheri Ruska wrote: > My dog "ate" my "math homework" and "my cat" cfp2:~ > cat a.rb string = 'My dog "ate" my "math homework" and "my cat"' re = %r/["'][^"']+["']|\w+/ tokens = string.scan re puts tokens cfp2:~ > ruby a.rb My dog "ate" my "math homework" and "my cat" a @ http://codeforpeople.com/ -- share your knowledge. it's a way to achieve immortality. h.h. the 14th dalai lama