Skip to content
Shuai YUAN edited this page May 29, 2015 · 1 revision

Table of Contents

Tip 77: Stake the Boundaries of a Match

Return to the top: <>

  • `\zs`: marks the start of a match
  • `\ze`: marks the end of a match

References:

Lookaround Expressions

* `\zs` is roughly equivalent to positive lookbehind * `\ze` is equivalent to positive lookahead.
  • Vim also supports the full matrix of negative/positive lookahead/lookbehind assertions, but the syntax differs from Perl.

References:

Example: Rewrite

using Vim’s positive lookaround items

Table of Contents


Clone this wiki locally