How to implement auto-close "https://url" in the tag?

The site has a stream of community events from facebook.
In the description of a particular event there are links for registration. How to make website links in this description is minimized to the tag ?
July 9th 19 at 11:06
1 answer
July 9th 19 at 11:08
Solution
str_replace(array("\r\n", "\n", "\r"),'
', preg_replace('#((http||https)?://(\S)+[\.](\S)*[^\s.,> )\];\'\"!?])#is', "\\1", $message) where $message - a text in which there are elements containing "http || https".

Find more questions by tags Facebook