2012-04-26 45 views
1

我想匹配Visual Studio的正则表达式查找/替换不工作,因为我希望

EchoCancellation = Convert.ToBoolean(SendReceivePackets.GetNameValuePairsFromUnparsedReply(parsedReply["EchoCancellation"])); 

并将其更改为:

EchoCancellation = Convert.ToBoolean(parsedReply["EchoCancellation"]); 

有关于这些3000。

这里是我的正则表达式:

SendReceivePackets\.GetNameValuePairsFromUnparsedReply\(parsedReply\["{\w*}"\]\) 

Visual Studio中说,它无法找到它。我不相信Visual Studio,我认为它只是懒惰。 :)

任何人都可以看到问题吗?

回答

1

\w:w

Visual Studio使用非标准的正则表达式。您正则表达式更改为

SendReceivePackets\.GetNameValuePairsFromUnparsedReply\(parsedReply\[":w"\]\) 

入住这里:http://msdn.microsoft.com/en-us/library/2k3te2cs%28v=vs.80%29.aspx

+0

微软,只是喜欢保持事情标准化呵呵。顺便说明一下。谢谢! – 2012-04-26 21:52:53

相关问题