vim 正则表达式获取双引号中的字符

来源:互联网 发布:无名体育淘宝 编辑:程序博客网 时间:2024/04/30 02:10

1.获取双引号中的字符

:%s/.*\"\(.*\)\".*/\1/

2.用字符串建立标签

如 hello  <hello></hello>

:%s/\([a-z,A-Z]*\)/<\1><\/\1>/


原创粉丝点击