Live data from Hacker News

Regexper: Beautiful regexp visualizations

regexper.com

131–132 of 132 posts

Re: Regexper: Beautiful regexp visualizations

#131
Pretty neat, although I have a nitpick with your choice of a block labeled "None of:" in for example this regex: /foo(.*)[^0-9]+bar/

It ends up saying "none of [0-9]" when that's not actually a good english description of what should go there. It should say something equivalent to "one or more things that are not [0-9]". The empty string fits the description "none of [0-9]" but does not match that part of the regex.

Re: Regexper: Beautiful regexp visualizations

#132
post #98

Earlier quoted context omitted.

To anyone that sees this email validation regex, DO NOT USE IT. Hope that was clear, if not obvious. Use something like `^([^\s]*)@([^\s]*\.[^\s]*)$` which will do most of the work for you, then check second group for common domain typos, and what have you.

>Use something like `^([^\s]*)@([^\s]*\.[^\s]*)$` which will do most of the work for you I don't understand. How does this expression do anything even remotely close to email validation? For example, how does it tell you that: These are valid: test@nasa.gov ~~~~@nasa.gov joe+sometext@nasa.gov test@bbc.co.uk and that: These are NOT valid test@example.com (no MX RR) test@-nasa.gov test"@nasa.gov test@nasa.gov- test tes…

This is an interesting sample. Can I see the rest of your data?
Post reply on HN