René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback

Searching in VIM

Concat operator

The concat operator is PATTERN\&PATTERN. It maches the last pattern if all preceding patterns (joined by the concat operator) match as well.
For example /.*foo\&.*bar matches any (beginning of a) line containing foo and bar, irrespective of their order.

Zero-width Assertions

Zero-width positive look ahead assertion

The perl equivalent is (?=PATTERN)

Zero-width negative look ahead assertion

The perl equivalent is (?!PATTERN)

Zero-width positive look behind assertion

The perl equivalent is (?<=PATTERN)

Zero-width negative look behind assertion

If for example you want to find all lines that don't end with at least three digits in this snippet,
eins 1
zwei 2
hundert 100
tausend 1000
dreiunddreissig 33
vierhundertachzig 480
fuenfhundert 500 f
you can use
to do this.
Alternatively, to find all bar that are not preceeded by a foo:
The perl equivalent is (?<!PATTERN)

Non greedy search


Searching within muliptle lines


Searching in a range only

Searching for a pattern in the range line 51 through line 99