πŸ’­ Bob Belderbos on X: "Forget Python for a sec, here's how Vim h... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ !https://twitter.com/bbelderbos/status/1709525676154368055 Date: October 5, 2023 External Link X (formerly Twitter) Β· twitter.com I need to learn regex capture groups better. This is so dang powerful. I really like the \v that bob uses here, it really does cut down on the terseness of all the special characters. β”‚ I wanted to replace all occurrences of: β”‚ β”‚ name,name@example.com,0,171,,2023-09-21 β”‚ β”‚ With: β”‚ β”‚ name,name@example.com β”‚ β”‚ Easy to do with Python, but what about a bit of > regex in Vim? β”‚ β”‚ :%s/\v([^,]+,[^,]+),.*/\1/ NOTE β”‚ This post is a thought . It’s a short note that I make about someone else’s content online #thoughts