应用visual studio的正则表达式替换功能

来源:http://www.vvcha.cn/c.aspx?id=145870

这个功能有时候还是比较有用的

譬如需要把项目中的所有的类似 this.get("name") 的函数替换为"name"字符串,

选中use regular expressions

在find what中输入: this.get\("{.*}"\) 

{}中为需要匹配的正则表达式 

在replace with中输入:"\1"

\1是{}中正则匹配的值 ,假如有多个依次为\2,\3......

这样就可以把

this.get("name")替换为"name"

this.get("ssss")替换为"ssss"

原文地址:https://www.cnblogs.com/dabaopku/p/1782177.html