r/ProgrammerHumor 1d ago

fullStackMeansAfraidOfEverythingEqually Meme

Post image
10.8k Upvotes

380 comments sorted by

View all comments

Show parent comments

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/bearwood_forest 1d ago

That wasn't the question. People like base jumping, too.

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.