title: Regex for splitting a string using space when not surrounded by single or double quotes
body: <p>I'm new to regular expressions and would appreciate your help.  I'm trying to put together an expression that will split the example string using all spaces that are not surrounded by single or double quotes. My last attempt looks like this: <code>(?!")</code> and isn't quite working. It's splitting on the space before the quote.</p>
  
  <p>Example input: </p>
  
  <pre><code>This is a string that "will be" highlighted when your 'regular expression' matches something.
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>This
  is
  a
  string
  that
  will be
  highlighted
  when
  your
  regular expression
  matches
  something.
  </code></pre>
  
  <p>Note that <code>"will be"</code> and <code>'regular expression'</code> retain the space between the words.</p>