yoavlavi@programming.dev to Programming@programming.devEnglish · 1 year agoMelody 0.19.0 | A language that compiles to regular expressions and aims to be more readable and maintainablegithub.comexternal-linkmessage-square12fedilinkarrow-up14arrow-down11cross-posted to: rust@programming.dev
arrow-up13arrow-down1external-linkMelody 0.19.0 | A language that compiles to regular expressions and aims to be more readable and maintainablegithub.comyoavlavi@programming.dev to Programming@programming.devEnglish · 1 year agomessage-square12fedilinkcross-posted to: rust@programming.dev
minus-squareTerrorBite :veripawed3:@meow.sociallinkfedilinkarrow-up0·1 year agoI am of the opinion that regex for email address is a bad idea. The only two things that you need to check an email address are: Does the address contain an @ symbol? Is there a dot to the right of the @ symbol? Then just try to deliver to it, and let the MTA do the rest. Email addresses can be complicated, and there’s plenty of valid addresses that can be excluded by attempts at regex validation. @custom_situation @yoavlavi
minus-squarecustom_situation@lemm.eelinkfedilinkEnglisharrow-up1·1 year agoi said “email” but what i meant was “show me a complicated example”. i don’t disagree with anything you said.
I am of the opinion that regex for email address is a bad idea. The only two things that you need to check an email address are:
Does the address contain an @ symbol?
Is there a dot to the right of the @ symbol?
Then just try to deliver to it, and let the MTA do the rest.
Email addresses can be complicated, and there’s plenty of valid addresses that can be excluded by attempts at regex validation.
@custom_situation @yoavlavi
i said “email” but what i meant was “show me a complicated example”. i don’t disagree with anything you said.