title: Using preg_replace to replace all occurrences in php
body: <p>Regex is absolutely my weak point and this one has me completely stumped. I am building a fairly basic search functionality and I need to be able to alter my user input based on the following pattern:</p>
  
  <p>Subject:</p>
  
  <pre><code>%22first set%22 %22second set%22-drupal -wordpress
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>+"first set" +"second set" -drupal -wordpress
  </code></pre>
  
  <p>I wish I could be more help as I normally like to at least post the solution I have so far, but on this one I'm at a loss.</p>
  
  <p>Any help is appreciated. Thank you.</p>