Very magic \v, very nomagic \V
Write regexes without a forest of backslashes, or search text exactly as written.
3 drills
- Swap parts with \v groups: Rewrite every line with one
:%scommand, using a very magic pattern with groups and\1\2in the replacement. - Alternatives with \v: Make the change on every line that needs it with one
:%s, using|(or) in a very magic pattern. - Search literally with \V: The target text is full of characters that mean something in a pattern. Land on it with one search.
The drill editor loads in your browser.