I have a string format inside of a string variable:
\"{0} Hello World {1}\"
I need to split it into something like this:
\"{0}\
You can do like this:
var myregexp = /({.*?})(.*?)({.*?})/im; var match = myregexp.exec(subject); if (match != null) { result1 = match[1]; result2 = match[2]; result3 = match[3]; }