15
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 28 Jul 2025
15 points (100.0% liked)
Programming
21924 readers
838 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
Where? I've literally never heard of this convention.
RegExes. For instance, in JavaScript,
'foobar'.match(/(foo)(bar)/)
is['foobar', 'foo', 'bar']
Now that you ask, I don't have any example of this. I know program
head
has negative numbers to access from the last element backwardsls -1 | head -n -1
, but it does not start by 0. So yeah, the 0 as last element might be not as common as I thought to be.-1 is common. I've at least seen it from python.