Richard Livsey wrote: > I want to split a string into words, but group quoted words together > such that... > > some words "some quoted text" some more words > > would get split up into: > > ["some", "words", "some quoted text", "some", "more", "words"] s = 'some words "some quoted text" some more words' p s.split( / *"(.*?)" *| / )