Abh*_*eet 5 regex visual-studio-2010
我需要
在Visual Studio中使用Can通配符搜索替换不同的receiveTimeOut属性值receiveTimeOut="59:59:59"来实现此任务吗?
<endpoint receiveTimeOut="10:10:20" someOtherProperty="x1" yetAnotherProperty="y1" />
<endpoint receiveTimeOut="10:50:20" someOtherProperty="x2" yetAnotherProperty="y2" />
...
<endpoint receiveTimeOut="30:50:20" someOtherProperty="x3" yetAnotherProperty="y3" />
Run Code Online (Sandbox Code Playgroud)
我试过:在"查找和替换"对话框中使用通配符选项,receiveTimeOut="*"但这会选择完整的行,receiveTimeOut="10:10:20" someOtherProperty="x1" yetAnotherProperty="y1" />
您可能已经猜到了,我正在编辑WCF服务web.config,并且必须手动重复执行此任务.
Ahm*_*eed 10
使用正则表达式选项...
找: <endpoint receiveTimeOut="[^"]+"
然后...
更换: <endpoint receiveTimeOut="59:59:59"
该[^"]+部分使用负字符类,匹配除双引号之外的任何字符.在+将一次或多次匹配.