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
Without regard to implementation language, your regex might look something like this:
("[^"]*"|[^"]+)(\s+|$)
The first part "[^"]*"
looks for a quoted string that doesn't contain embedded quotes, and the second part [^"]+
looks for a sequence of non-quote characters. The \s+
matches a separating sequence of spaces, and $
matches the end of the string.