使用通配符/Regex查找&;在VisualStudio中替换

使用通配符/Regex查找&;在VisualStudio中替换,regex,visual-studio-2010,Regex,Visual Studio 2010,我需要用一个receiveTimeOut=“59:59:59” 在VisualStudio中,是否可以使用通配符搜索来完成此任务 <endpoint receiveTimeOut="10:10:20" someOtherProperty="x1" yetAnotherProperty="y1" /> <endpoint receiveTimeOut="10:50:20" someOtherProperty="x2" yetAnotherProperty="y2" /> .

我需要用一个
receiveTimeOut=“59:59:59”
在VisualStudio中,是否可以使用通配符搜索来完成此任务

<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" />

...
我尝试过:在查找和替换对话框中使用通配符选项,
receiveTimeOut=“*”
但这会选择完整的行,
receiveTimeOut=“10:10:20”someOtherProperty=“x1”yetAnotherProperty=“y1”/>


正如您可能猜到的,我正在编辑WCF service web.config,必须手动重复执行此任务。

使用regex选项


查找:
艾哈迈德是一条出路。但作为一种天真的、稍有不同的选择,人们可以搜索:

receiveTimeOut="[0-9]*\:[0-9]*\:[0-9]*"

这需要在
receiveTimeOut值的双引号之间的数据有两个冒号(转义),其周围有任意数量的数字。

事实证明,使用正则表达式执行此操作非常简单。 只需对通配符使用.*并选中“使用正则表达式”。 例如,我有一些网格,我想查找属性为Visible=“False”的列。 所以字符串可能是:telerik:GridBoundColumn name=“name”Visible=“False” 我的搜索字符串是:“GridBundColumn.*Visible=“False”
完成。

哪个版本的Visual Studio?VS-2010,以及更新的标签。您完全正确--对此表示抱歉。我更新了我的回答,至少是正确的,如果在这一点上没有实际帮助的话。