开发者

How can I include the period (.) in Vim's search and replace command? (replacing .html extensions)?

When I do开发者_开发知识库: /.html Vim looks for html

I would like to replace all the .html with .php

Something like this: :%s/html ext/php ext/g


Escape it. The . is a regex character which means "any character", so you need to escape it with \.

:%s/\.html/.php/g


Just escape the . character.

Search for /\.html


Try escaping period character: /\.html


Use backslach to escape the dot.

/\.html will look for ".html".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜