http(s)?:\/\/([a-z-A-Z-0-9]+(\.))+([a-z-A-Z]+)(\/[a-z-A-Z-0-9]*)*(\?((\&)?(.)+=(.)+)*)?
The regex above can be tested here
Matches the http://
or https://
Matches the domain and subdomain
Matches a .com
, .net
, .io
, etc.
Matches the routes, like /post/1
, /news
, etc.
Match the url parameters