1.提取两个指定字符串中间的值
Regex rg = new Regex("(?<=(" + "起始字符串" + "))[.\s\S]*?(?=(" + "结束字符串" + "))", RegexOptions.Multiline | RegexOptions.Singleline);
string str = rg.Match(s).Value;
"#Version 1.0#"
1.提取两个指定字符串中间的值
Regex rg = new Regex("(?<=(" + "起始字符串" + "))[.\s\S]*?(?=(" + "结束字符串" + "))", RegexOptions.Multiline | RegexOptions.Singleline);
string str = rg.Match(s).Value;
"#Version 1.0#"