Really need help fixing deprecated preg_replace()

Hi guys I have an older script that I just rolled back out and I’m getting the following error…

preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

Below is my line of code and I’m failing at fixing this.

$text = preg_replace(’#([\s()])(www|ftp).(([\w-]+.)[\w]+(:[0-9]+)?(/[^"\s()<[])?)#ie’, ‘’$1’.handle_url_tag(’$2.$3’, ‘$2.$3’)’, $text);

Any help would be greatly appreciated!! :wink:

Sorry please ignore the code line above…

[php] $text = preg_replace(’#([\s()])(https?|ftp|news){1}://([\w-]+.([\w-]+.)[\w]+(:[0-9]+)?(/[^"\s()<[])?)#ie’, ‘’$1’.handle_url_tag(’$2://$3’)’, $text);[/php]

It’s just the \e escape modifier that is the problem.

Sponsor our Newsletter | Privacy Policy | Terms of Service