Linux vi 匹配单词

来源:互联网 发布:fake it till make it 编辑:程序博客网 时间:2024/05/23 23:12
当想匹配 \"the\"时,如果我们输入\"/the\"来查找所有的 \"these\"也会被匹配,所以我么们需要告诉vi我们找的the就是单词结尾。
这时输入

/the\\>

就不会匹配到these了。

同样的防止匹配上 \"sooth\" 时,我们再加上\"/<\" 即

/\\<the\\>

原创粉丝点击