I was like, why specify “one or more” and then make it optional? Isn’t that just .*?
Yes! Well said.
DRY is usually helpful if you don’t use it in situations where you have like 2 semi-different things. If they’re actually the same and you have 3 or more then the level of abstraction is worth it almost always.
Ah, didn’t know +? was lazy, thanks
Code that’s easy to extend generally encourages creating related code that’s easy to delete. These are very similar directives.
The capture group must be the same each time it repeats, so the number of characters stays the same. So X groups of Y characters = string of length X*Y. X and Y can be anything so any string length that can be made by multiplying two numbers-- which is every non-prime string length-- is matched. 0 and 1 are handled specially at the start.
Is there a reason to use (..+?)
instead of (.+)
?
Do you have a reason to think this or did it just sound good in your head
You’re right, but man reading this is insufferable. You could be much more effective if you weren’t trying to be a dick in your responses.
Did you just say conservatism is a form of liberalism?
See also the giraffe nerve that takes a 15 foot detour because it didn’t evolve to go on the other side of their hearts. It’s theorized to have travelled even further in dinosaurs:
(Source)
Thank you! I love VS Code
Fun hiccup fact: the default human state is hiccups, and there’s a small part of the brain that normally suppresses them. There have been rare cases where it’a damaged and someone just… never stops hiccupping. A fate worse than death imo.
I spent like 3 hours yesterday deduplicating two functions that were hundreds of lines long and nearly identical. I should probably learn how to use that git command that can diff two files on disk. Luckily I actually enjoy cleaning up code sometimes.
Gaslight gaskeep gasboss
This is why there are none, but I still think it’s dumb. Parsers can’t see comments anyways.
You know, I probably should have looked into this… yeah, this is me lol. I’ve seen floppies and we had an old rotary phone, but I’ve never heard of a beeper. It still sounds weird but at least there’s a reason.
Erm technically that’s the air pushing not the vacuum sucking 🤓
Nothing objectively, it just sounds so stupid to me that I have an irrational aversion lmao