Vim lookahead / lookbehind reference
This is another simple Vim lookahead / lookbehind reference.
Positive | Negative | |
Lookahead | /pattern1\(pattern2\)\@= | /pattern1\(pattern2\)\@! |
Lookbehind | /\(pattern2\)\@<=pattern1 | /\(pattern2\)\@<!pattern1 |
Search for pattern1 (not) proceeded or followed by pattern2.
Note: The enclosing parenthesis \(...\) are optional when pattern2 is one character.