如何取得双引号内的字符串(C#)
2011-02-16 13:44
260 查看
一个字符串中带有双引号,如何获取到双引号内的字符串呢?
例如string words="hello\"world\"";要获取到"world"
using System.Text.RegularExpressions;
例如string words="hello\"world\"";要获取到"world"
using System.Text.RegularExpressions;
string words = "hello\"world\""; Regex regex = new Regex("\"[^\"]*\""); string result = regex.Match(words).Value.Replace("\"", "");
相关文章推荐
- 一个字符串中带有双引号,如何取得双引号内的字符串(C#)
- AutoCAD.Net/C#.Net QQ群:193522571 LinQ 已知字段名的字符串如何从一个表中取得这个字符串对应字段的所有记录
- 如何取得通用权限管理控件授权(下载C#通用权限管理源码)
- c# 调用数据库函数(如何取得返回值)
- 如何用C# string.Replace方法将字符串中的替换成
- C#如何使用转义字符来正确的表示双引号、单引号等字符串 asp.net
- 在C#中取得指定长度的字符串
- C#中如何将字符串转换byte[],同时如何将byte[]换成字符串?
- 如何去掉字符串最外层的双引号,使其变成数组.
- 如何取得 Emgu CV Image 資料位置 (C#)
- 如何去掉C#字符串中的所有空格
- 如何去掉C#字符串中的所有空格
- 一个可序列化的C#对象,如何转成一个XML格式的文件或字符串(转)
- 在C#中取得指定长度的字符串
- 一个可序列化的C#对象,如何转成一个XML格式的文件或字符串【转】
- 编程回忆之C#回忆(如何向webservice传输xml格式字符串)
- 如何取得通用权限管理控件授权(下载C#通用权限管理源码)
- 请问我如何在一个webBrowser控件中加载一个 html格式的字符串 - _NET技术 - C#
- C#中如何获取一个字符串的实际字符数
- C#如何根据字节截取字符串指定长度