From: Wayne Blair Date: 2001-06-06T01:18:38+09:00 Subject: [ruby-talk:16240] Re: Parsing Question Hi Steve, With Guy's help, I figured out hopefully the cleanest way. (I know this is overkill but I have time on my hands.) def parseCommandLine(aString) return aString.scan(/\w+|"(?:\\"|[^"])*"/) end Wayne ps you might also prefer ensuring word breaks with /\b\w+|"(?:\\"|[^"])*"/