3 ms·
Which was the point of my first message.
by linkdd 6y ago
Which was the point of my first message.
- PeterWhittaker 6y agoSurely that should be /^[^@]+@[^@]+$/ ?
- jameshart 6y agoAccording to the RFC compliant email regex, “\@“@example.com is a valid email address, which your simplified test would reject.
- linkdd 6y agoExactly. The worst regex would be: /^[a-zA-Z0-9\-_]+@[a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+$/ Because it would invalidates `my-email+custom-inbox@example.com`. And that's a pattern I use to automatically sort incoming mails. Many websites use such a regex :(