HN Hall of Fame Weekly email

In search of the perfect URL validation regex (2010)

mathiasbynens.be Books & learning Tutorials & guides Web & internet Candidate
Screenshot of mathiasbynens.be captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 2 calendar years, with breakout response in 2 of them.

submissions
4
submitters
3
observed span
2015–2021
peak thread · 77 comments
152 pts
latest 20+ return · 2021-09-25
152 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

Even if you built a URL validation regex that follows rfc3986[1] and rfc3987[2], you will still get user bug reports because web browsers follow a different standard. For example, <http://example.com./> , <http:///example.com/> and <https://en.wikipedia.org/wiki/Space (punctuation)> are classified as invalid urls in the blog, but they are accepted in the browser. As the creator of cURL puts it, there is no URL standard[3]. [1]: https://www.ietf.org/rfc/rfc3986.txt [2]: https://www.ietf.org/rfc/rfc3987.txt [3]…

likium·152-point thread·

Why are these in the `should fail' section? http://www.foo.bar./ http://10.1.1.1 http://10.1.1.254 http://10.1.1.0 http://10.1.1.255 The top one is just a fully qualified domain name, and the rest could be valid host addresses depending on your subnet size.

jetpks·97-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
253

reference only — not used in Hall rules or ranking

Total comments
141

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2015-02-02In search of the perfect URL validation regexairnomad30
2015-07-09In search of the perfect URL validation regex (2010)Jonhoo10
2015-08-06In search of the perfect URL validation regexFirst breakoutedward9777
2021-09-25In search of the perfect URL validation regex (2010)Best thread · Latest 20+ point returnJonhoo15264