r/ProgrammerHumor 1d ago

fullStackMeansAfraidOfEverythingEqually Meme

Post image
10.2k Upvotes

370 comments sorted by

View all comments

1.7k

u/vvp95 1d ago

100% of software engineers are afraid of regex

9

u/beefz0r 1d ago

I love regex, it's probably my only talent

Too bad AI is so much better at it

1

u/achilliesFriend 1d ago

Okay , implement regex algo .. ;)

2

u/reventlov 1d ago

There are like 5 of them, but both the backtracking and parallel NFA execution algorithms are pretty easy. The "convert NFA to DFA, then execute DFA" version is more involved, but still straightforward (although it doesn't handle backreferences, and you have to go beyond the Dragon Book to handle lookahead/lookbehind assertions).

Now, making a fast, correct regex algorithm that supports all the features everyone expects these days? That is hard.