Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lookarounds positive negative lookbehind lookahead

Tags:

vsvim

after searching all over google for vsvim lookahead or lookbehind and on the wiki I can't seem to figure out how, or if it even supports lookahead or lookbehind (positives or negatives) and how to use them if so.

I've tried a few different syntaxes like \ze \@= (?<=let \w\+)( \(?<=let \w\+\)( that I've seen on vim answers but none of them seem to be working in vs vim for matching (nor substitution)

how do you do lookarounds in VsVim?

like image 851
Maslow Avatar asked May 11 '16 15:05

Maslow


Video Answer


1 Answers

For any newcomers, I'll copy the contents of this link here for the future:

http://ssiaf.blogspot.ru/2009/07/negative-lookbehind-in-vim.html

/\(Start\)\@<!Date

This will match the 'Date' in 'EndDate' and 'YesterdaysDate' but will not match 'StartDate'

/Start\(Date\)\@!

will match the 'Start' in 'Starting but not in 'StartDate'

/Start\(Date\)\@=

will match the 'Start' in 'StartDate' but not in 'Starting

/\(Start\)\@<=Date

will match the 'Date' in 'StartDate' but not in 'EndDate' and 'YesterdaysDate'

like image 104
blurb Avatar answered Sep 19 '22 15:09

blurb