title: Replace single quote with double quote with Regex
body: <p>I have an app that received a malformed JSON string like this:</p>
  
  <pre><code>{'username' : 'xirby'}
  </code></pre>
  
  <p>I need to replaced the single quotes <code>'</code> with double quoates <code>"</code></p>
  
  <p>With these rule (I think):</p>
  
  <ul>
  <li>A single quote comes after a <code>{</code> with one or more spaces</li>
  <li>Comes before one or more spaces and <code>:</code></li>
  <li>Comes after a <code>:</code> with one more spaces</li>
  <li>Comes before one or more spaces and <code>}</code></li>
  </ul>
  
  <p>So this String <code>{'username' : 'xirby'}</code> or</p>
  
  <pre><code>{  'username' : 'xirby'  }
  </code></pre>
  
  <p>Would be transformed to:</p>
  
  <pre><code>{"username" : "xirby"}
  </code></pre>
  
  <p>Update:</p>
  
  <p>Also a possible malformed JSON String:</p>
  
  <pre><code>{  'message' : 'there's not much to say'  }
  </code></pre>
  
  <p>In this example the single quote inside the message value should not be replaced.</p>