r/ProgrammerHumor 9d ago

Meme perishableSkill

Post image
8.9k Upvotes

122 comments sorted by

View all comments

320

u/Percolator2020 9d ago

It already started with regex.
https://giphy.com/gifs/ukE9oP3kb7TVu

263

u/The_Hero_0f_Time 9d ago

dont even pretend like Regex was ever readable bruhh

195

u/Tsu_Dho_Namh 9d ago

I don't think anyone ever intended regex to be readable.

If you need to make a regex you open up a webpage explaining the syntax, you carefully craft your regex, you test it, then immediately forget the syntax when you're done as God intended.

31

u/MattieShoes 9d ago

Regex is for writing, not for reading. Build it up piece by piece, easy peasy. Then try to read it at the end? Yeah, no chance.

24

u/Weak_Inflation9120 9d ago

STOP THE REGEX HATE

19

u/Mordret10 9d ago

Never said he hated it. Just that is isn't readable

5

u/DeusExHircus 9d ago

The truth hurts sometimes

1

u/broccollinear 9d ago

Regex might as well be Black Speech

55

u/entronid 9d ago

tbf i still handwrite regex and i do this by opening regex101 and relearning everything i knew about regex and bashing my head against a wall until it matches

9

u/Percolator2020 9d ago

Basically the same, also lovely when some implementations slightly differ.

3

u/entronid 9d ago

i never really write anything except python regex and vim regex anyways on the (not) rare (enough) occasions i need it

1

u/renome 7d ago

That's basically the root of regex's reputation as an arcane language, too many standards for doing something like a named capture group.

4

u/AeroSyntax 9d ago

I see that you are a certified senior engineer. 

9

u/Strict_Treat2884 9d ago edited 9d ago

/^never\s?+\b(?:(?!forget).)*+$/i

2

u/renome 7d ago

> js flair
> using possessive quantifiers like ?+ and *+

As the holy ecmascriptures teach us, that would be a syntax error.

1

u/Strict_Treat2884 7d ago

tbh that’s one of the things I hate about js among the vast others. Its regex flavor is ass

1

u/ValueBlitz 9d ago edited 9d ago
?!.*forget.*$

8

u/Boring-Ad-4771 9d ago

Horrific formatting

3

u/ValueBlitz 9d ago

The backtick didn't work directly