Regex re = new Regex("(?<=\").*?(?=\")", RegexOptions.None);
MatchCollection mc = re.Matches("你的字符串");
foreach (Match ma in mc)
{
//ma.Value就是你要的值
}
C#中利用正则表达式获取字符串中双引号包含的内容
最新推荐文章于 2025-03-31 13:33:46 发布
Regex re = new Regex("(?<=\").*?(?=\")", RegexOptions.None);
MatchCollection mc = re.Matches("你的字符串");
foreach (Match ma in mc)
{
//ma.Value就是你要的值
}