0
我试图取代Descendants(ns + "string").First().Value
到经常在Visual Studio取代:亮点出现,但不会取代
Descendants().First(x => x.Name.LocalName == "string").Value from visual studio.
我试着在搜索Descendants\(ns \+ .*"\).First\(\).Value
并正确凸显出现。但Descendants().First(x => x.Name.LocalName == \1).Value
不会取代\1
到"string"
请告诉我我做错了什么。
感谢
我thnk你的意思是这个http://regex101.com/r/aO5dB0/4?你的正则表达式不会被捕获任何东西。 – 2014-08-29 20:51:06
查看http://regex101.com/r/aO5dB0/4。获得相同的结果Descendants()。First(x => x.Name.LocalName == \ 1).Value。 \ 1不会被字符串替换。 – sanjeev 2014-08-29 20:58:08
尝试使用'$ 1' .... – 2014-08-29 20:59:08