Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 在VS2012中为查找和替换编写复杂的正则表达式_Regex_Visual Studio 2010_Automata - Fatal编程技术网

Regex 在VS2012中为查找和替换编写复杂的正则表达式

Regex 在VS2012中为查找和替换编写复杂的正则表达式,regex,visual-studio-2010,automata,Regex,Visual Studio 2010,Automata,我想在我的项目中找到并替换一种重复的字符串。 我想使用VS2012查找和替换来简化我的任务 原始字符串是 Format(Element[Be], Element[Be]) and I want to replace it following Element[Be].ToString(Element[Be].Value) 如何使用正则表达式使用VS2012的FindReplace功能实现这一点请尝试以下正则表达式: Format\(([^,]*),\s*([^\)]*)\) 以及以下替换

我想在我的项目中找到并替换一种重复的字符串。 我想使用VS2012查找和替换来简化我的任务

原始字符串是

Format(Element[Be], Element[Be])

 and I want to replace it following

Element[Be].ToString(Element[Be].Value)

如何使用正则表达式使用VS2012的FindReplace功能实现这一点请尝试以下正则表达式:

Format\(([^,]*),\s*([^\)]*)\)
以及以下替换字符串:

$1.ToString($2.Value);
在C#中:


尝试以下正则表达式:

Format\(([^,]*),\s*([^\)]*)\)
以及以下替换字符串:

$1.ToString($2.Value);
在C#中: