4 ms·
If I understand this correctly ... valid emails aren't a regular language, but there is a regex for them because regexes can match nested parentheses, but no on
by OreganoTrail 2y ago
If I understand this correctly ... valid emails aren't a regular language, but there is a regex for them because regexes can match nested parentheses, but no one has ever made written down or generated this regex because it's too much work. So everyone uses good-enough regexes instead. (Reasonable.)
- wglb 2y agoI don't think that is true. Check this out: https://pdw.ex-parrot.com/Mail-RFC822-Address.html https://pdw.ex-parrot.com/Mail-RFC822-Address.html
- OreganoTrail 2y agoIt says right there: "The regular expression does not cope with comments in email addresses. ... The Perl module pre-processes email addresses to remove comments before applying the mail regular expression."