News for hackers. Stuff that matters.
Re:RegExr: A website for interactive regex prototyping with ... by psk on Thursday May 21, 2015 @03:06AM (#9581338)
Sites like this is great and all, but I wish they included some commonly used regexes. Like a list of 'good' regexs to validate phone numbers, emails and other common stuff.

It would actually be pretty cool to have a site like this except you could add the regex to a list, and then people could upvote the regexe depending on the quality of it.

Re:RegExr: A website for interactive regex prototyping with ... by ddebernardy on Thursday May 21, 2015 @03:48AM (#9581462)
You can only validate a zip code, a phone number, an address, or an email address using a regex up to a point.

There are too many dispartities from a country to the next for the first three to hope validating anything withhout a bunch of false negatives. Some countries don't have zip codes.

For emails, blindly following the RFCs yields a monster (see [1]), and it won't help you if you run into oddball email addresses that are not RFC-compliant but work regardless due to technical implementations (or vice versa).

http://regular-expressions.mobi/email.html

Re:RegExr: A website for interactive regex prototyping with ... by psk on Thursday May 21, 2015 @03:07AM (#9581340)
...and I just checked the community link. Way to go :-)
Re:RegExr: A website for interactive regex prototyping with ... by addandsubtract on Thursday May 21, 2015 @03:55AM (#9581479)