I am working for a non-profit and i'm not an expert in PHP.
I need to replace the following code:
$status = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $status);
When I attempt to modify it to preg_replace, I get an error every different way I try to exit the code.
This will do the job:
But if the goal of this replacement is to keep all urls and transform them into links, you must change the pattern a little. And, why not, test them with filter_validate_url