title: Regular expression for quotes in php and js
body: <p>I need to change bad quotes <code>“”</code> and <code>""</code> to <code>„“</code>.
  For example I will take a few sentences with a bad input and what it should look like after a replace:</p>
  
  <p>Bad input: <code>„Do It“: „Another sentence in quotes“ “Bayern”</code>
  <br>Good output: <code>„Do It“: „Another sentence in quotes“ „Bayern“</code></p>
  
  <p>Another example: <br>
  Bad input: <code>„Do It“: „Another "sentence" in “Bayer” quotes“ “Ba “yer” n”</code> <br>
  Good output: <code>„Do It“: „Another „sentence“ in „Bayer“ quotes“ „Ba „yer“ n“</code> <br></p>
  
  <p>The tricky thing is that the same quote <code>“</code> is used in a good quotes (at the end) and in a bad quotes (at the beginning).</p>