使用正则表达式 string words = "hello\"world\""; Regex regex = new Regex("\"[^\"]*\""); string result = regex.Match(words).Value.Replace("\"", "");
一个字符串中带有双引号,如何取得双引号内的字符串(C#)
最新推荐文章于 2023-01-29 18:13:32 发布
使用正则表达式 string words = "hello\"world\""; Regex regex = new Regex("\"[^\"]*\""); string result = regex.Match(words).Value.Replace("\"", "");