In vi, Find the Next Line that Does NOT Match
Thank you Nijat Aliyev :
In VIM :
Type / to enter search mode. Then enter
^\(.*match\)\@!.
The backslashes because VIM is primitive.. So you can't just use ( and ) and @!.
What you're looking for is :
Start of line, anything ending with "match" , zero-width negative lookbehind assertion (that is, the previously specified (within parentheses) shout NOT match (@!) and then something (.). If you want to be case insensitive, use \cmatch.
https://stackoverflow.com/questions/3101877/find-first-non-matching-line-in-vim/68249837#68249837
Comments
Post a Comment