lookarounds positive negative lookbehind lookahead

前端 未结 2 800
失恋的感觉
失恋的感觉 2021-01-17 14:11

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

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-17 14:59

    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\)\@

    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'

提交回复
热议问题