I want to split a command line like string in single string parameters. How look the regular expression for it. The problem are that the parameters can be quoted. For exampl
there's a python answer thus we shall have a ruby answer as well :)
require 'shellwords' Shellwords.shellsplit '"param 1" param2 "param 3"' #=> ["param 1", "param2", "param 3"] or : '"param 1" param2 "param 3"'.shellsplit