title: javascript split string by space, but ignore space in quotes (notice not to split by the colon too)
body: <p>I need help splitting a string in javascript by space (" "), ignoring space inside quotes expression.</p>
  
  <p>I have this string:</p>
  
  <pre><code>var str = 'Time:"Last 7 Days" Time:"Last 30 Days"';
  </code></pre>
  
  <p>I would expect my string to be split to 2:</p>
  
  <pre><code>['Time:"Last 7 Days"', 'Time:"Last 30 Days"']
  </code></pre>
  
  <p>but my code splits to 4:</p>
  
  <pre><code>['Time:', '"Last 7 Days"', 'Time:', '"Last 30 Days"']
  </code></pre>
  
  <p>this is my code:</p>
  
  <pre><code>str.match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
  </code></pre>
  
  <p>Thanks!</p>