I have a function that will add the tag before a link and after the link. However, it breaks for some webpages. How would
function processString($s) { return preg_replace('/https?:\/\/[\w\-\.!~#?&=+\*\'"(),\/]+/','$0',$s); }