title: Replaceing <a href="mailto: with just email aadress
body: <p>I want to replace all "mailto:" links in html with plain emails. </p>
  
  <pre><code>In: text .... &lt;a href="mailto:somebody@example.org"&gt;not needed&lt;/a&gt; text
  Out: text .... somebody@example.org text
  </code></pre>
  
  <p>I did this:</p>
  
  <pre><code>$str = preg_replace("/\&lt;a.+href=\"mailto:(.*)\".+\&lt;\/a\&gt;/", "$1", $str);
  </code></pre>
  
  <p>But it fails if there are multiple emails in string or html inside "a" tag</p>
  
  <pre><code>In: &lt;a href="mailto:hello@somedomain.org"&gt;not needed&lt;/a&gt;&lt;a href="mailto:somebody@example.org"&gt;&lt;font size="3"&gt;somebody@example.org&lt;/font&gt;&lt;/a&gt;
  Out: somebody@example.org"&gt;
  </code></pre>