在VI编辑器打开的文件中搜索指定单词
请告诉我如何在 VI 编辑器中打开文件时搜索特定单词。我知道我们可以通过使用 /word_to_be_search 来做到这一点,但它不会对单词进行精确搜索。
Example
/sachin will searches for sachin_server, sachin_client and not only sachin
Please tell me how to search for a specifig word if the file is opened in VI Editor. I know we can do it by using /word_to_be_search but it will not do the exact search for the word.
Example
/sachin will searches for sachin_server, sachin_client and not only sachin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请尝试:
\<
和\>
匹配单词边界。Try instead:
the
\<
and\>
match word boundaries.\<
是单词的开头,\>
是单词的结束标记。\<
is the beginning of word, and\>
is the end of word marker.这样做:
/\
do this:
/\