码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2017-07-01 20:54:00      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:nbsp   htm   pop   blog   ack   target   track   表达   targe   

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

1.获取双引号中的字符

[html] view plain copy
 
  1. :%s/.*\".?\".*/\1/  

 

2.用字符串建立标签

如 hello  <hello></hello>

 

[html] view plain copy
 
  1. :%s/[a?z,A?Z]?/<\1><\/\1>/  

 

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

标签:nbsp   htm   pop   blog   ack   target   track   表达   targe   

原文地址:http://www.cnblogs.com/stevendes1/p/7103380.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!