一个字符串中带有双引号,如何取得双引号内的字符串(C#)

来源:互联网 发布:还处于叛逆期 知乎 编辑:程序博客网 时间:2024/06/13 23:12
使用正则表达式string words = "hello\"world\"";            Regex regex = new Regex("\"[^\"]*\"");            string result = regex.Match(words).Value.Replace("\"", "");
0 0
原创粉丝点击