title: Converting IMG tag to AMP-IMG
body: <p>I'm using a <code>preg_replace</code> to convert an <code>&lt;img&gt;</code> tag to <code>&lt;amp-img&gt;</code> but it's not working.</p>
  
  <pre><code>$str = '&lt;img src="welcome.jpg" alt="Welcome"&gt;';
  
  echo preg_replace("%&lt;img .*&gt;%i", "&lt;amp-img $1&gt;&lt;/amp-img&gt;", $str);
  </code></pre>