【发布时间】:2010-12-13 16:00:11
【问题描述】:
在 vi 中,搜索和替换,如何转义 '/'(正斜杠)以使其正确。在路径中说。
喜欢:/Users/tom/documents/pdfs/
:%s//Users/tom/documents/pdfs//<new text>/g --FAILS (obviously)
:%s/\/Users/tom/documents/pdfs\//<new text>/g -- FAILS with a trailing error
:%s/'/Users/tom/documents/pdfs/'/<new text>/g -- FAILS with a trailing error
我错过了什么?
【问题讨论】: