4 ms·
I die inside whenever I use `\<` and `\>` for word boundary regex. Neovim has no plans to change this either. I'll likely switch eventually so I don't have to k
by AlexErrant 2y ago
I die inside whenever I use `\<` and `\>` for word boundary regex. Neovim has no plans to change this either. I'll likely switch eventually so I don't have to know two flavors of regex. One is hard enough.
- dgellow 2y agoOnly two?! *cry in posix BRE, posix ERE, PCRE, JS regexp, .NET regexp, emacs regexp*
- AlexErrant 2y ago...you just made me realize I know (some of) the differences between JS and .NET regexp, in addition to vim and PCRE. Profanity.
- frou_dh 2y agoI gather that in really old regex syntax the word boundary syntax used to be like this: [[:<:]]foo[[:>:]] ...so it could be worse!
- orbisvicis 2y agoUse `\v` then `<` and `>`, and you can make it default.
- oktoberpaard 2y agoI just add `\v` (very magic) to make it interpret regex more strictly. I’ve just tested it and you don’t need to escape these anymore to match word boundaries.
- djaouen 2y agoUse \b lol