puzzling.org · mary.gardiner.id.au

Text editor tips

Performing non-greedy regular expression matches in vim

If you wanted, say, the '.*' in "<div>.*</h1>" to be non-greedy, you change it to "<div>.*\{-}</h1>"

See Vim Regular Expressions 101

Last modified: 15 April 2009