Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A Liberal, Accurate Regex Pattern for Matching URLs. Parent comment
Why bother trying to validate the domain lexically, when you can just try resolving it?
(It's not my regex - I lifted it from someone who had the time to write a comprehensive test suite.)
Why bother trying to validate the domain lexically, when you can just try resolving it?