If I have a string like this
create myclass \"56, \'for the better or worse\', 54.781\"
How can I parse it such that the resul
You can split by this
\s(?=(?:[^"]*"[^"]*")*[^"]*$)
See demo.
https://regex101.com/r/fM9lY3/60
string strRegex = @"\s(?=(?:[^""]*""[^""]*"")*[^""]*$)";
Regex myRegex = new Regex(strRegex, RegexOptions.Multiline);
string strTargetString = @"create myclass ""56, 'for the better or worse', 54.781""";
return myRegex.Split(strTargetString);