URL

Matches HTTP/HTTPS URLs

Pattern

https?:\/\/[\w\-]+(\.[\w\-]+)+[\w\-.,@?^=%&:/~+#]*

Matching examples

https://example.comhttp://sub.domain.com/path

Non-matching examples

ftp://filenot-a-url

Breakdown

https?:
http or https
\/\/
Literal //
[\w\-]+
Hostname
(\.[\w\-]+)+
Domain parts
[\w\-.,@?^=%&:/~+#]*
Path and query

Related tools

Other patterns