4
How to make the function transition preg_replace to the preg_replace_callback in this case? I use arrays why in the future I can add continuation..
preg_replace(
array(
'/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?´ªìîëí]))/'
),
array( '' . $this -> makelink( $1 ) . '' ), $text
);
Please add method code
$this->makelinkand also the variable declaration$text.– Daniel Ribeiro
I didn’t understand why you wanted to use this function, in this case, the regex pattern array, would not be for you to create a continuation of the link, but different link patterns.
– Marcelo Aymone