Skip to content
DevMeme
3524 of 7590
Languages Post #3860 · source on Telegram

When Neo awakens and starts deflecting bugs with overly complex regular expressions

Description

Three Matrix movie stills form the meme. Panel 1 shows Trinity looking worried, subtitle: “What is he doing?”. Panel 2 cuts to Morpheus replying, “He is beginning to regex”. Panel 3 shows Neo in the hallway, hand raised to stop bullets; faces are blurred while the scene is covered in white monospace snippets - “^[a-zA-Z]”, “^[0-9]”, “\S+@\S+\.\S+”, “/^.*<(0[\n]|\s@')^[^<0-9\\.\-\s@']+.../”, and “^\+\d{1,2}\s?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$”. The visual pun equates Neo’s bullet-time mastery with a developer finally ‘seeing the Matrix’ of text patterns through regex. It humorously captures the moment programmers realise the power (and chaos) of regular expressions to tame unruly input

Comments

29
Anonymous ★ Top Pick Regex feels like bullet-time until a single UTF-8 zero-width joiner slips through and reminds you why the grown-ups write parsers
  1. Anonymous ★ Top Pick

    Regex feels like bullet-time until a single UTF-8 zero-width joiner slips through and reminds you why the grown-ups write parsers

  2. Anonymous

    After 15 years in the industry, I've learned there are only two types of senior engineers: those who admit they still Google regex syntax every single time, and those who lie about it while secretly maintaining a 'regex_patterns_that_actually_worked.txt' file from 2009

  3. Anonymous

    Ah yes, the moment every developer transitions from 'I'll just use .contains()' to staring into the abyss of nested capture groups and lookaheads. That email validation regex is particularly spicy - someone clearly chose violence over using a library. The phone number pattern suggests they're still in the 'I can handle this' phase, right before discovering that international formats exist and their regex becomes sentient. Give it a week and they'll be the person in code review saying 'Actually, we should just use a validation library' while everyone else nods knowingly, having walked this same path of regex-induced enlightenment

  4. Anonymous

    That epiphany when your regex groks Unicode just fine... until prod's minified JSON triggers exponential backtracking

  5. Anonymous

    Every problem looks solvable with ^(.*)$ - right up until catastrophic backtracking turns your SLO into 500s

  6. Anonymous

    Beginning to regex: that sacred moment when a “quick fix” becomes a 300‑char PCRE, latency turns O(2^n), and someone quietly opens a PR to swap in RE2

  7. @mbozhenko 4y

    Now he can read regex, yeah)

  8. @andronkolaider 4y

    Now he can speak regex

    1. @somerandomdough 4y

      Regex native speaker

      1. @bommelhopser 4y

        Now he IS regex

  9. @Vivaldes 4y

    If you want to master regex you should think like regex

  10. @azizhakberdiev 4y

    Quantificators that in regex also cause quantum entanglments

  11. @RiedleroD 4y

    Did you ever hear the tragedy of Darth Regex the Wise? I thought not. It's not a story the coders would tell you. It's an IT legend. Darth regex was a dark lord of parsers, so powerful and so wise he could use strings to influence the text… The dark side of the code is a pathway to many abilities some consider to be unnatural.

    1. @azizhakberdiev 4y

      Not all can use this power safely. In wrong hands it can cause cathostrophic backtracking that destroys everything nearby any time he tries using this power

      1. @azizhakberdiev 4y

        Damage will grow exponentially, depending on how long was the string he tried to execute it on

  12. @JoseAngelSanchez 4y

    ❤️ https://regex101.com/

    1. @RiedleroD 4y

      best website

  13. @qtsmolcat 4y

    I love that I actually recognize that scene now lol

  14. Deleted Account 4y

    Regex in a nutshell

    1. @RiedleroD 4y

      imma steal that image

    2. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

      😂😂😂😂😂

  15. Deleted Account 4y

    Cmon, not a big deal. A lot of constructors available online.

    1. @Agent1378 4y

      Modern day people can't do anything by themselves.

      1. Deleted Account 4y

        Well, lets be honest - you also coding not in a plain machine codes, right? So, i think, if something helps you to do your job, why not use it?

        1. @Agent1378 4y

          Yes. But i know assembly and underlying architecture very well. So, one can start using regex constructor only after mastering writing regex himself on the quite good level.

          1. @RiedleroD 4y

            I disagree. I learned regex through using such tools and now I'm basically a regex God amongst my classmates (which isn't a big achievement, but I know regex now is what I was trying to say)

            1. @Agent1378 4y

              Than it is ok. You just learn it differently, but learning method isn't that important, if in the result you've learned it.

  16. @eth0fox 4y

    regex is somehow worse than my code to read, i mean it's easy to write though (https://regexr.com my beloved) 😅

  17. @aaaarrti 1mo

    https://regexlicensing.org/

Use J and K for navigation