How do you transition the function preg_replace
to preg_replace_callback
in this case? I use arrays because I can add continuation in the future.
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
);