Jump to content

ereg_replace to preg_replace


scarhand

Recommended Posts

Someone tell me the proper way to convert this depreciated function to its proper, preg_replace alternative?

 

ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $message);

 

The function simple converts URL's into links. I just want to know the proper regex to use, perl-wise.

Link to comment
https://forums.phpfreaks.com/topic/191843-ereg_replace-to-preg_replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.