linux - find string in vim
过去多啦不再A梦
过去多啦不再A梦 2017-06-26 10:49:52
0
3
1467

Use vim to view a document, which contains the following strings:

complete[13]
complete[4]
complete[1]                                                              
complete[3]
abc[13]
13
4
1
3

How to find the first string that is not complete[13] and complete[3]?

过去多啦不再A梦
过去多啦不再A梦

reply all(3)
小葫芦

Available for personal testing

/^\(.*complete\[\(3\|13\)\]\)\@!.*

Please refer to: Detailed explanation of @

大家讲道理

If the string you are looking for is on a separate line and at the beginning of the line, as in the example, use
^(complete[(13|3)])@!
If you want to find a line that is not complete[ 13] or 3
sw(complete[(13|3)])@!

小葫芦

/complete[13] and /complete[3] /string are searching for a certain string. But searching for the first one is not. I don’t know. I didn’t see the question clearly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template