News for hackers. Stuff that matters.
Re:Email Regex that works 99.99% by PeterWhittaker on Sunday February 22, 2015 @08:29AM (#9089310)
Completely useful, as part of a two step process:1

1. Filter with the regex - what's left has a valid format, making step 2 much saner.

2. Extract and validate the domain name - super simple now, because the domain component is known to be sane.

(Optional but good idea 3: Handle exceptions....)

Step 1 is almost always the hardest part, now it's mostly done.

Re:Email Regex that works 99.99% by Piskvorrr on Sunday February 22, 2015 @08:40AM (#9089358)
The assumption here is "0. create a regex that does not have false negatives". You seem to be taking the author's word for the "99.9% Works" part - based on what? (Exactly.)
Re:Email Regex that works 99.99% by PeterWhittaker on Sunday February 22, 2015 @09:22AM (#9089503)
Correctness and utility are two different things, feel free to investigate the former whilst we discuss the latter....
Re:Email Regex that works 99.99% by Piskvorrr on Monday February 23, 2015 @05:44AM (#9093581)
Well thank you, I doubt I would have come to such conclusion by myself. Are you saying that "turn away 0.1% of your customers" is a useful approach? Well, your call, I guess.
Re:Email Regex that works 99.99% by PeterWhittaker on Tuesday February 24, 2015 @07:46AM (#9100186)
Whoa, there: You're shifting your argument. Are you now accepting that it is 99+% correct? Your original objection was as to the correctness of the regex.

If it is 80% good, then, yeah, your underlying assertion is likely good: Too little coverage to be all that useful. But 99+% coverage? For a quick pass filter? That's pretty good, we can work with those numbers.

After all, one could have multiple layers of progressively more accurate but progressively slower filters. Not an uncommon or unusual approach.

Besides, the JS version could be very useful as a quick pass usability check, validating whether the user made a silly mistake. And adding some logic to record the bogus entry, compare it to what they write next, pass it to the server if need be, can all be very useful.