• Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    3 hours ago

    Yeah, I’m just saying that the benefit of using such a regex isn’t massive (unless you’re building a service which can’t send a mail).

    a@b is a syntactically correct e-mail address. Most combinations of letters, an @-symbol and more letters will be syntactically correct, which is what most typos will look like. The regex will only catch fringe cases, such as a user accidentally hitting the spacebar.

    And then, personally, I don’t feel like it’s worth pulling in one of those massive regexes (+ possibly a regex library) for most use-cases.