*************************请教一个关于Regex.Replace的问题*******************
我是这样做的
string str = ".........theForm.Submit();......... ";
string sTemp = Regex.Replace(str , "theForm.Submit(); ", "theForm.Submit();fun1(); ",RegexOption.IgnoreCase);
用上面的代码把把theForm.Submit();替换成theForm.Submit();fun1();
但是程序执行后没有替换,是什么地方没对吗?
------解决方案--------------------string sTemp = Regex.Replace(str, "theForm\\.Submit\\(\\); ", "theForm.Submit();fun1(); ", RegexOptions.IgnoreCase | RegexOptions.Multiline);