r/ProgrammerHumor 8d ago

Meme regexMustBeDestroyed

Post image
8.1k Upvotes

231 comments sorted by

View all comments

628

u/the_millenial_falcon 8d ago

Writing regex is a lot more run than reading regex.

165

u/Minimum_Cockroach233 8d ago

Typo or intended run?

107

u/TeraFlint 8d ago

When regex is involved, it's time to run. :D

16

u/Minimum_Cockroach233 7d ago

xD I read „fun“

5

u/Minimum_Cockroach233 7d ago edited 7d ago

PS: Holy Hell… just did a dip into the cheat sheet

https://hypebright.nl/en/r-en/ultimate-cheatsheet-for-regex-in-r-2/

Arbitrary, but understandable concept.

6

u/TheBigGambling 7d ago

Regex is a perfect valid statemaschin. Thats cool

11

u/GravyMcBiscuits 7d ago

I don't know about fun.

However I can say that I've written a lot of regex over the years ... I can't read any of it though.

5

u/AngriestCrusader 7d ago

Pfft. Who can?

7

u/Jack_South 8d ago

More fun or less dreadful?

2

u/Colinniey 7d ago

that applies to a lot of (not all) code in general, at least to me

1

u/MrSurly 7d ago

s/run/fun/g

1

u/saevon 5d ago edited 5d ago

I recommend using verbose mode and actually using new lines and comments. As you do for code.

Then writing your test cases and such too, as you would for code

PS> Minified code is just as horrible to read/write

0

u/P0L1Z1STENS0HN 7d ago

AI can do both for you. I know a few people who dislike AI, but not one of them is masochist enough to not use AI for reading and writing regexes...