Skip to content
DevMeme
6167 of 7590
AI ML Post #6762 · source on Telegram

Patiently Waiting for AI to Filter the Regex-Averse

Description

A four-panel meme using the 'Mr. Bean Waiting' format. The top text across all panels reads, 'Me waiting when AI replaces all those'. The first two panels show Mr. Bean standing in a vast yellow field, smiling and then checking his watch. The bottom-left panel shows him sitting down, implying a long wait. The bottom-right panel has the punchline overlaid: '"software developers" who claim that regex is hard'. The quotation marks around 'software developers' are sarcastic, suggesting the author doesn't consider them true developers. The meme is a form of gatekeeping humor, playfully asserting that a developer's inability to handle regular expressions - a notoriously complex but powerful tool for pattern matching - is a sign of incompetence, and that these individuals will be the first to be made obsolete by artificial intelligence

Comments

44
Anonymous ★ Top Pick I'm not saying I agree, but I did once see a senior engineer try to parse an HTML string with regex, and now I believe some people deserve to be replaced by a well-trained `sed` command
  1. Anonymous ★ Top Pick

    I'm not saying I agree, but I did once see a senior engineer try to parse an HTML string with regex, and now I believe some people deserve to be replaced by a well-trained `sed` command

  2. Anonymous

    Call me when the LLM can craft a single-line PCRE that validates nested parentheses *and* passes code review without a three-day bikeshed

  3. Anonymous

    The real regex here is /(senior|architect)/ matching developers who've spent years debugging someone else's 'clever' one-liner that could've been three readable lines - yet still waiting for AI to understand why (?<!\\)(?:\\\\)*\K@(?=\S) is perfectly reasonable for email validation in legacy Perl

  4. Anonymous

    The real irony? AI models are literally built on regex-like pattern matching at their core, yet somehow we're supposed to believe they'll replace the developers who understand those patterns. It's like saying calculators will replace mathematicians who understand addition - sure, the tool automates the execution, but someone still needs to know when and how to apply it. Besides, any senior engineer knows the hard part of regex isn't writing it - it's maintaining the one your predecessor wrote without comments six months later

  5. Anonymous

    I'll worry about AI taking my job when it writes a production-safe regex that avoids catastrophic backtracking, and then pushes back with 'use a parser'

  6. Anonymous

    AI will replace us right after it ships a regex that validates emails, avoids catastrophic backtracking on prod logs, and remains maintainable by someone other than the author

  7. Anonymous

    AI masters regex greedily, but those devs match the lazy quantifier: they'll be replaced first

  8. @anonusernametg 1y

    It's not that regex is hard, it's just that we rarely need it and by the time we do, we have already forgotten it lol

    1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

      You see thats a skill issue. Did you know the find and replace dialogs in modern IDEs support regex?😏 How can you forget it if you use it there frequently?

      1. @anonusernametg 1y

        Maybe I don't use it as much in the IDEs either!? 😏

      2. @SamsonovAnton 1y

        Why would anybody use Search & Replace in IDE at all? Don't modern IDEs support "smart" renaming of identifiers, eliminating the need for "dumb" text-based approach? PS. Just kidding.

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          Lmfao

      3. 我が名はレギオン 1y

        Regex is garbage and true developer won’t use it

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          Regex is one of the best tools for both find and replace and user input validation too.

          1. 我が名はレギオン 1y

            Frontend monkeys aren’t developers

            1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

              Ok you think your IDE which is a frontend too and your SQL server manager and your terminal and your belowed ssh is made without input validation?

            2. @deadgnom32 1y

              have you ever worked with real software?

              1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                Doubt

                1. @deadgnom32 1y

                  if he did. I would be happy to know which one it was. I know how to break it in seconds

            3. @deadgnom32 1y

              input validation is a topic far beyond frontend. I mean. one could just turn it off on frontend using dev console. you ultimately must validate it on backend

              1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                Input validation on frontend is iust a user convenience. (And maybe saving backend resources, by not letting it eat shit)

    2. Sure Not 1y

      s/we/me/

    3. @purplesyringa 1y

      Honest question: how do you forget regex? It's incredibly simplistic, the only thing I sometimes forget is the syntax for negative look-aheads and look-behinds, but barring that, what is there to know?

      1. @anonusernametg 1y

        I don't put in the time to learn it properly + there are usually more than one way to write a regex. It's now been a month since the last time I had to use regex 🤷‍♂️

        1. @purplesyringa 1y

          I mean, I haven't used regex in... months, probably? but it's like riding a bicycle to me

          1. @purplesyringa 1y

            Regex is just ". means any character, pattern+ means 1 or more repetitions of (possibly distinct strings matching) the pattern, pattern* is >= 0, pattern? is 0 or 1, (pat1|...|patn) is either of patterns, [a-zA-Z0-9] is any character within the range"

            1. @purplesyringa 1y

              I mean I guess you can also talk about +?/*? and (?:...) and look-ahead/behind but I don't think people who admit to struggling with regex even need those

            2. @sylfn 1y

              you forgor {4,10} and similar for count repetition

              1. @purplesyringa 1y

                I also forgor [^...] and ^/$ and \w and \b but yeah

                1. @purplesyringa 1y

                  and also . not matching newlines and [^\s\S] as a workaround

                  1. @purplesyringa 1y

                    okay yeah maybe regex is for nerds

                    1. @sylfn 1y

                      programming in general is for nerds too

                  2. @deadgnom32 1y

                    (?s) — now dot matches new lines

                    1. @purplesyringa 1y

                      my regex knowledge is from the time when web browsers didn't support any features like that, so I got used to [^\s\S] (and I was mostly working on frontend at the time), but yeah

            3. @deadgnom32 1y

              and (?:pattern1)*?pattern2 or (?:pattern1)*+pattern2

              1. @purplesyringa 1y

                that's the first time I've seen anyone use *+ in the wild

                1. @deadgnom32 1y

                  I did that a lot on Data Engineering position. spares a lot of computing cycles if you know what you do

                  1. @purplesyringa 1y

                    oh, fun. For some raason I thought that + is the opposite of ?, meaning that it's a no-op by default, but looks like I confused it with something else

                    1. @deadgnom32 1y

                      it cancels backtracking. if the pattern2 is not found. it won't try to go back 1 step and try to look for it there. like you know exactly, you are looking for closing bracket. and everything before that is surely not a closing bracket. so there is no need to backtrack. you can declare — pattern not found immediately.

                      1. @purplesyringa 1y

                        yeah, I googled it before replying

                        1. @purplesyringa 1y

                          I'll probably incorporate it somewhere eventually, although I'm mostly writing parsers by hand these days

                          1. @purplesyringa 1y

                            Thanks for teaching me something new!

      2. @deadgnom32 1y

        depends on task. greedy / non greedy patterns atomic groups special character handling optimized regex is often much harder to write than just some regex. with data intensive tasks, performance can matter and the difference between .* and semantically optimized version can be immense.

      3. @RiedleroD 1y

        there's variants, and sometimes I confuse them tbf

Use J and K for navigation