I seem to be having an issue replacing a text link with a link to the site posted, it isn\'t linking.
The code:
$status_text = preg_replace(\'#(\\A|[
Can you just try this:
function makeClickableLinks($s) {
return preg_replace('@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '$1', $s);
}
To test it, try this:
echo makeClickableLinks('Hello world, you go to www.google.com to check! also http://www.google.com/ works too!');
Demo here: http://codepad.viper-7.com/hkOdCM