function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
P AshwinP Ashwin 

Regex for url

I need a regular expression for a url which should function similar to the one on case description field.
Below test cases should pass: 
- transport.info
- transport.info.
- and obviously all strings having https, http, ftp, .com, ,info, .gov and so on.

For the below ones it should fail:
- abc.xyz
- transport.info.come
- google.com.and some random text' -> In this case google.com should be hyperlink, notice there is no space after google.com and the period.
 
I'm using the below:
https://developer.salesforce.com/forums/?id=906F000000093UGIAY
there are lot of regex available on stackexchange but I need one which would compile with salesforce. 

I'm rather more after - How does salesforce identify in case description that a particular string is url