fork(1) download
  1. <?php
  2.  
  3. $s = '<a href="http://m...content-available-to-author-only...e.com/?page=1&amp;fun=true&amp;foo=bar&amp;yes=no">';
  4. echo preg_replace_callback('~(<a\b[^>]*href=)(([\'"]).*?\3|\S+)([^>]*>)~', function ($m) {
  5. return $m[1] . html_entity_decode($m[2]) . $m[4];
  6. }, $s);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
<a href="http://m...content-available-to-author-only...e.com/?page=1&fun=true&foo=bar&yes=no">