So, I tested and confirmed and basically rewrote the entire function to one line. Who knew?
Anyhow here it is in all of its glory:
function trackURL($content) {
$content = preg_replace('/\< a(\s|\n|[^href])href=\"([^"]+)\"\>([^<]+)\<\/a\>/','$3',$content);
return $content;
}
Blogger is giving me gripe about the regex, so here's a screenshot:
Cheers!
No comments:
Post a Comment