Skip to content
DevMeme
3653 of 7590
CodeReviews Post #3991 · source on Telegram

Regex Review By Trust Fall

Description

The image is a cropped GitHub-style pull request diff with a green added-code block at the top and an inline review comment below. The visible code imports Python's `re` module and adds an `email_regex` raw string that appears to match lowercase email addresses with character classes, an optional dot or underscore, an at sign, a word-domain segment, a dot, and a 2-to-3-character suffix. A reviewer comment in the thread says, "i'm gonna trust you with this one," followed by a reply field and a "Resolve conversation" button. The joke is that regular expressions, especially email regexes, often become so dense that code review turns from verification into social trust.

Comments

27
Anonymous ★ Top Pick Every email regex review eventually reaches the same approval state: LGTM, pending formal proof by someone else's outage.
  1. Anonymous ★ Top Pick

    Every email regex review eventually reaches the same approval state: LGTM, pending formal proof by someone else's outage.

  2. Deleted Account 4y

    Dashes would not work(idk if they are in actual email addresses)

  3. @ivan_orange 4y

    Many things won't work that's awful regex for email

  4. @affirvega 4y

    it matches only one _, so email [email protected] won't work

    1. @TERASKULL 4y

      we don't need that many users anyway, come back when you have a NORMAL email

      1. @affirvega 4y

        I'm just gonna register on 20minutemail.com email for that

  5. @Rumbatutumba 4y

    you can always verify on stakO

  6. @affirvega 4y

    How to verify email address 1. You don't use regex 2. Just try to send a message. If they registered - great, if not - autodelete account

    1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

      Lol I can see ddos

      1. @affirvega 4y

        Just the same with the valid email addresses?

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

          Nvm I am on the go. I was already distracted by my email not working with that regex

      2. @affirvega 4y

        Or do you mean I should remove autodeletion?

  7. @ivan_orange 4y

    I usually use [email protected], so I know who sent me spam or sold/leaked my data (you can put anything after "+" in Gmail [email protected] and [email protected] are same mailboxes) And it won't work here because of +

    1. @paul_thunder 4y

      Nice hint Going to try this

    2. @MMageGangsta 4y

      tnx

    3. @affirvega 4y

      Thanks!

    4. @dsmagikswsa 4y

      Thankyou sir. That’s cool!

    5. @MrXLR8 4y

      Thanks. What resources already leaked your data?

  8. @kitbot256 4y

    this is an extremely stupid regex. Would not work for for [email protected], or for [email protected]...

  9. @Araalith 4y

    Also this regex doesnt work for something like [email protected]

  10. @igordata 4y

    dot is optional, btw. 2-3 for domain zone is obsolete, so... The one and only way to check if that's a valid email address is that there have to be something before and after @. Let's say .+@.+ (valid != existing)

  11. @asm3r 4y

    RFC 822 https://stackoverflow.com/questions/20771794/mailrfc822address-regex looks much better

  12. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

    [email protected]

  13. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

    And my password is nicknameyear /s

    1. @sylfn 4y

      with space and slash-s appended?

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

        Nope just everything together

  14. @s2504s 4y

    If you had some issue and solved this issue by regex, so now you have two issues

Use J and K for navigation