Domain name validation

Posted by & filed under PHP, Techie.

I was revisiting the validation of domain names and realised that most of the regexes posted around the web have faults. Many refer to Sean Inman’s 2006 post, which does a fair job but is prone to break as new TLDs are introduced. This answer on StackOverflow is about the best I’ve found so far:… Read more »