c# 搜索匹配格式字符串

来源:百度知道 编辑:UC知道 时间:2024/05/27 11:57:04
从已知字符串中搜索匹配

boundary="内容"\r\n

这个格式的内容,并读取""内的内容用c#怎么做?正则式怎么写?或者用其他方法也行
String text = "head=\"hello\" body=\"heihei\" boundary=\"我想要的内容\"\\r\\n";
String res = text.split("boundary=\"")[1].split("\"\\r\\n")[0];
res 就是我要的。。原来2年前我很嫩。。

string[]text=new string[3];
text=boundary.split('"');
text[0]=你要的...

没明白 给个输入输出sample吧 正则有用的 不过你得说清楚问题啊

切开

没看懂。