vimtricks.wiki Concise Vim tricks, one at a time.

How do you use lookbehind in Vim search patterns?

Answer

/\(foo\)\@<=bar

Explanation

Use \@<= for positive lookbehind. /\(foo\)\@<=bar matches 'bar' only when preceded by 'foo'. Use \@<! for negative lookbehind.

Next

How do I visually select a double-quoted string including the quotes themselves?