Try it out on these example inputs:

back to RegexSwap.

Website URL

Regular expression:

^https?://[a-z0-9_-][\.[a-z0-9_-]]*\.(com|edu|org|net|int|info|eu|biz|mil|gov|aero|travel|pro|name|museum|coop|asia|[a-z][a-z])+(:[0-9]+)?[/[a-zA-Z0-9\._#-]]*/?$

Categories:

Popularity:

You need to be logged in to cast votes on regexes.

Good
0
Bad
0

Author description and comments (0)

Topic by
kasper

2009-01-05
22:21

Description

Validates a HTTP or HTTPS url for a website. It works well for most uses, but there are a few corner-cases that it cannot handle.

Known issues:
  • URL "GET" parameters are not supported.
  • Top-level domains are not literally validated.

You need to be logged in to participate

In order to post your own comments on this regex, you need to be logged in.

Username:

Log in by clicking the login link at the top of the screen