Re:Ruby's Email Address Regexp
by DeepYogurt on Tuesday January 04, 2022 @09:58PM
(#29804464)
What about @@.@?
[ Parent
| on HN ]
Interesting question. RFC1123 states that TLDs should be alphabetic, and that the first (or only) character must be a letter or a digit, which should exclude a TLD of '@'. local-parts can include most printable characters other than ()<>[];:@\,.
/^+@+$/ is easy and the false positives it allows are weird enough to accept.
People who have weird email addresses are used to them not working.
There is nothing before the first @, and nothing after the last @.
While that's true, `@@.@` fulfils "an @ symbol with something before it, and something after it".
Re:Ruby's Email Address Regexp
by Skadabucci on Tuesday January 04, 2022 @10:09PM
(#29804546)
The original comment probably meant something like this:
^[^@]@[^@]$