Posted on August 26, 2013
vim tutorial – using the s command to replace text on the fly
The vim text editor comes with a powerful :s (substitution) command that is more versatile and expressive than the search and replace functionality found in GUI based text editors. The general form of the command is: :[g][address]s/search-string/replace-string[/option] The… Read More
Posted on March 1, 2011
Regex lookahead and lookbehind
A common search scenario involves finding all occurrences of a string x, but that are not followed by string y. Here’s a contrived example. Let’s say you were fond of using the variables foo, bar, and foobar. They… Read More