3 ms·
For me one of the most common issues is when I write a regex but I have some of the escapes the wrong way around etc. So I’m giving a valid regex, but it’s not
by codetrotter 4y ago
For me one of the most common issues is when I write a regex but I have some of the escapes the wrong way around etc. So I’m giving a valid regex, but it’s not matching what I tried to match. And then I have to change it around a couple of times before it works.
One reason for this is that different programs have different rules for what should be escaped when, when you write a regex. For example, I think grep is a bit different from vim in this regard
- chefandy 4y agoHm... Now that I think about it, regex tools on the command line haven't been a goto recently. I used sed, awk, perl -e, et. al. constantly from the late 90s until maybe 2015 but since then I'm more likely to pop open a ipython repl or whatever and avoid those weird inconsistencies altogether. Also, developing on the old scp->LAMP stack setup required more shell script glue than the more automated contemporary setups I've been using. I'd probably suck at it. No matter how frequently I use regex in :ex commands, I always screw up the escapes, substitutions, etc.