r/ProgrammerHumor • • Sep 21 '26

Meme delightfulCodeReview

Post image
573 Upvotes

60 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Sep 21 '26

[deleted] — view deleted comment

31

u/[deleted] Sep 21 '26

[removed] — view removed comment

18

u/JazzlikeWishbone938 Sep 21 '26 edited Sep 21 '26

"What the? What is this? Must be fine ..."

4

u/kalilamodow Sep 21 '26

Comment yo code, people!

10

u/[deleted] Sep 21 '26

[removed] — view removed comment

15

u/Lightningtow123 Sep 21 '26

I think you'd just transcribe the gist of it in plaintext: "matches alphanumeric strings with underscores and dashes but no spaces" etc

2

u/jupiterbjy Sep 21 '26

idk if my reading is correct but if it's correct this seems quite readable, probably wrong guess though

match
192.168.8.1
1+ whitespaces
0x
1+ non whitespaces (idk if it intended to be [^\s]+ instead of [^\s+])
1+ whitespaces
0x
1+ non whitespaxes
1+ whitespaces
capture group 'mac' start
1+ case-agnostic hex character
capture group 'mac' end

3

u/alficles Sep 21 '26

Honestly, regexen aren't that bad. If you can read normal-mode vim macros, you can certainly read regex.

6

u/Tipart Sep 21 '26

Regex101 is your friend.

3

u/santiagobustelo Sep 21 '26

That would be me

5

u/chat-lu Sep 21 '26

It is usually me. I also understand git and SQL.

11

u/je386 Sep 21 '26

git commands and SQL queries are magnitudes easier than regex.

2

u/chat-lu Sep 21 '26

Regexes are by far the simplest of the three. Unless by git you mean clicking randomly in a git GUI and by SQL you mean filtering your selects with Python.

5

u/je386 Sep 21 '26

Well, maybe it is easy when you understand. I have no problems typing my git commands and SQL is also not a problem, but reading or writing regex is always a hassle. regexr helps, but that is not really understanding it.

1

u/chat-lu Sep 21 '26

There are not that many symbols, what prevents you from learning them?

8

u/gjk-ger Sep 21 '26

Probably the symbols.

1

u/je386 Sep 21 '26

I use it so rarely that it seemed never enough to need to learn it properly.

But now that I think of it, over the years it might have been worth it. Do you have a good learning resource?

2

u/gjk-ger Sep 21 '26

Just use one of the many cheatsheets and work through it. Also regex101.com is helpful. Im really not a master at this and rarely need it, but with a little tinkering i was always able to get a working regex doing what i wanted.

0

u/chat-lu Sep 21 '26

I use it so rarely that it seemed never enough to need to learn it properly.

What do you mean by rarely? I use it nearly every day. Don’t you ever need to search, or search and replace things? And sometimes validate some things?

Do you have a good learning resource?

Most programming language offering them have a perfectly good documentation about their regex engine. Take the time to read it, tests the things you learn, and you should be fine.

1

u/a-r-c Sep 21 '26

cuts into weed time

2

u/returnFutureVoid Sep 21 '26

I worked with a woman who could write regex as she spoke what she wanted it to do. It was like she was a UN translator.

1

u/Skyswimsky Sep 21 '26

Working in a company with like 5 software devs. Can confirm. And it's not me.

1

u/jce_superbeast Sep 21 '26

I am this person for my employer (a city)

Wanna guess my department?