News for hackers. Stuff that matters.
Re:In search of the perfect URL validation regex by pluma on Friday August 07, 2015 @04:17AM (#10021399)
Using a regex to validate a URL is only marginally less stupid than using a regex to validate an e-mail address.

Validating URLs is also something you shouldn't have to implement yourself.

Re:In search of the perfect URL validation regex by nalllar on Friday August 07, 2015 @06:01AM (#10021667)
Validating email addresses with a regex is fine if you follow the HTML5 spec for email addresses: http://www.w3.org/TR/html5/forms.html#valid-e-mail-address

> This requirement is a willful violation of RFC 5322, which defines a syntax for e-mail addresses that is simultaneously too strict (before the "@" character), too vague (after the "@" character), and too lax (allowing comments, whitespace characters, and quoted strings in manners unfamiliar to most users) to be of practical use here.