title: How to remove escaped forward slash using php?
body: <p>I am using the Google Drive API and the <code>refresh_token</code> I obtain has an escaped forward slash. While this should be valid JSON, the API won't accept it when calling <code>refreshToken()</code>. I am trying to remove the backslash using <code>preg_replace</code>:</p>
  
  <pre><code>$access_token = "1\/MgotwOvbwZN9MVxH5PrLR2cpvX1EJl8omgYdA9rrjx8";
  $access_token = preg_replace('/\\\//', '/', $access_token);
  </code></pre>
  
  <p>I would like the returned string to be:</p>
  
  <pre><code>"1/MgotwOvbwZN9MVxH5PrLR2cpvX1EJl8omgYdA9rrjx8";
  </code></pre>
  
  <p>I've tried various expressions, but it either doesn't remove the backslash or it returns an empty string. Note that I don't want to remove all backslashes, only the ones escaping a forward slash.</p>