1.提取两个指定字符串中间的值
Regex rg = new Regex("(?<=(" + "起始字符串" + "))[.\\s\\S]*?(?=(" + "结束字符串" + "))", RegexOptions.Multiline | RegexOptions.Singleline);
string str = rg.Match(s).Value;
"#Version 1.0#"
posted on 2019-08-20 09:44 Innershar 阅读(182) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 Innershar Powered by .NET 9.0 on Kubernetes