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
44Comment deleted
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
Call me when the LLM can craft a single-line PCRE that validates nested parentheses *and* passes code review without a three-day bikeshed
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
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
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'
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
AI masters regex greedily, but those devs match the lazy quantifier: they'll be replaced first
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 Comment deleted
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? Comment deleted
Maybe I don't use it as much in the IDEs either!? 😏 Comment deleted
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. Comment deleted
Lmfao Comment deleted
Regex is garbage and true developer won’t use it Comment deleted
Regex is one of the best tools for both find and replace and user input validation too. Comment deleted
Frontend monkeys aren’t developers Comment deleted
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? Comment deleted
have you ever worked with real software? Comment deleted
Doubt Comment deleted
if he did. I would be happy to know which one it was. I know how to break it in seconds Comment deleted
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 Comment deleted
Input validation on frontend is iust a user convenience. (And maybe saving backend resources, by not letting it eat shit) Comment deleted
s/we/me/ Comment deleted
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? Comment deleted
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 🤷♂️ Comment deleted
I mean, I haven't used regex in... months, probably? but it's like riding a bicycle to me Comment deleted
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" Comment deleted
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 Comment deleted
you forgor {4,10} and similar for count repetition Comment deleted
I also forgor [^...] and ^/$ and \w and \b but yeah Comment deleted
and also . not matching newlines and [^\s\S] as a workaround Comment deleted
okay yeah maybe regex is for nerds Comment deleted
programming in general is for nerds too Comment deleted
(?s) — now dot matches new lines Comment deleted
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 Comment deleted
and (?:pattern1)*?pattern2 or (?:pattern1)*+pattern2 Comment deleted
that's the first time I've seen anyone use *+ in the wild Comment deleted
I did that a lot on Data Engineering position. spares a lot of computing cycles if you know what you do Comment deleted
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 Comment deleted
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. Comment deleted
yeah, I googled it before replying Comment deleted
I'll probably incorporate it somewhere eventually, although I'm mostly writing parsers by hand these days Comment deleted
Thanks for teaching me something new! Comment deleted
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. Comment deleted
there's variants, and sometimes I confuse them tbf Comment deleted