scarhand Posted February 12, 2010 Share Posted February 12, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/191843-ereg_replace-to-preg_replace/ Share on other sites More sharing options...
premiso Posted February 12, 2010 Share Posted February 12, 2010 Perhaps this will help you: http://codingforums.com/showthread.php?t=181757 Quote Link to comment https://forums.phpfreaks.com/topic/191843-ereg_replace-to-preg_replace/#findComment-1011165 Share on other sites More sharing options...
scarhand Posted February 12, 2010 Author Share Posted February 12, 2010 thanks Quote Link to comment https://forums.phpfreaks.com/topic/191843-ereg_replace-to-preg_replace/#findComment-1011199 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.