Answer the question
In order to leave comments, you need to log in
A clickable link in the text, with long links trimmed?
Good afternoon!
I broke my whole head with a seemingly simple regex
function linkes($text){
return preg_replace("/(^|[\n ])([\w]*?)((ht|f)tp(s)?:\/\/[\w]+[^ \"\n\r\t<,]*)/is", "$1$2<a target=\"_blank\" href=\"$3\" >$3</a>", $text);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question