In this Regex tutorial, I'll be covering how to search a page for a url. I'll be breaking down each part of the expression and explain what each part does.
/^(https?://)?([\da-z.-]+).([a-z.]{2,6})([/\w .-])/?$/
This is a regex used to match a URL. This set of characters looks like it means nothing but it is infact a search pattern to find a url.