I have the following regex to detect URLS:
/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig
However, it doesn’t detect urls such as www.google.ca and tlk.tc/ApSE. Is there an regex where I can detect these URLs? I am using javascript.
This expression does what you want. It is not a valid URL which this regexp is matching, but it fits your requirements: