I want to make a php script that will check a text file or a string if it contains a url or domain.
I would like to ask how to make a regex to match url. I would like to match the following strings:
example.com
example.com.ca
example.co.uk
www.example.com
www.example.com.ca
www.example.co.uk
m.example.com
mobile.example.com
sample-example.com
mobi.m.example.co.uk
mobi-m.example.co.uk
and all the other possible domain/url just without the http://, https://, ftp:// etc.