Skip to content
DevMeme
2015 of 7590
Debugging Troubleshooting Post #2245 · source on Telegram

The five stages of dealing with Regex

Description

A four-panel comic strip meme illustrating the struggle of working with regular expressions. In the first panel, a stick-figure character looks in a mirror, confidently stating, 'I AM A GROWN MAN'. The second panel shows him at a desk, saying, 'I'M A BIG ADULT'. In the third panel, he sits at a laptop with the screen showing 'regex for dummies' and says, 'I CAN DO THIS', while a massive, cryptic regex pattern looms beside him. The final panel depicts the character crying uncontrollably in front of the laptop. This meme captures the universal developer journey with regex: starting with confidence, underestimating the complexity, and ultimately breaking down in frustration. It hilariously portrays how regex, with its dense and arcane syntax, can humble even experienced programmers

Comments

25
Anonymous ★ Top Pick Some say that if you have a problem and you think regex is the solution, now you have two problems. They're wrong. You have a problem, a regex, and a future maintenance ticket that no one will ever want to touch
  1. Anonymous ★ Top Pick

    Some say that if you have a problem and you think regex is the solution, now you have two problems. They're wrong. You have a problem, a regex, and a future maintenance ticket that no one will ever want to touch

  2. Anonymous

    “I can nail this email regex,” said every senior dev right before deploying a 40-KB pattern, paging Ops, and quietly drafting an RFC for the new “just-click-the-confirmation-link” microservice

  3. Anonymous

    After 20 years in the industry, I've learned there are two types of developers: those who pretend to understand regex, and those who've given up pretending and just use an online regex builder while praying the Stack Overflow answer from 2012 still works

  4. Anonymous

    The classic regex journey: 'I have a problem. I know, I'll use regular expressions!' Now you have two problems - and one of them is explaining to your therapist why you're having nightmares about nested lookaheads and catastrophic backtracking

  5. Anonymous

    15+ YoE and regex still forces a regex101 tab orgy just to validate an email

  6. Anonymous

    Regex is the only quick fix where a stray .* turns your 99.9% SLO into a backtracking incident and a 3 a.m. postmortem

  7. Anonymous

    "Quick regex" is how you accidentally ship a write-only DSL: PCRE nods, RE2 refuses, and the CEO's email is suddenly "invalid"

  8. @RiedleroD 5y

    me when regex

  9. @RiedleroD 5y

    btw that regex in that screenshot wouldn't parse

    1. @chupasaurus 5y

      btw it's full version doesn't cover 100% of cases it was created for anyway

      1. @RiedleroD 5y

        pain

        1. @chupasaurus 5y

          Between choosing their current state or addition of Turing completeness I'm for the former all the way.

          1. @chupasaurus 5y

            Jeez I have Vietnam flashbacks of sendmail.cf rn

  10. @RiedleroD 5y

    pretty sure

  11. Сифуд Кстолу 5y

    Шло третье тысячелетие...

  12. @Sashman 5y

    http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/

    1. @chupasaurus 5y

      It's a Perl script, not a regexp. There are no while or write functions = no Turing completeness.

      1. @p4vook 5y

        By the way, printf is Turing-complete

        1. @chupasaurus 5y

          relying heavily on inner function calls, but yeah it is Basically it can call a nice portion of C standard lib

  13. @Sashman 5y

    Turing completeness, my ass

  14. @Sashman 5y

    and deterministic termination, yes

  15. @qwnick 5y

    Idk, its not that hard

  16. @RKRohk 5y

    why did I spend 15 minutes trying to figure out what this regex was supposed to do

    1. @lord_nani 5y

      Its cropped

  17. @RKRohk 5y

    I realized that 15 minutes late

Use J and K for navigation