当前位置:编程学习 > C#/ASP.NET >>

使用正则表达式提取字符串?

helloworld:myname is tianya

MIME-Version: 1.0
Content-Type: Multipart/report;
report-type=delivery-status;

-----Content-Description: Delivery error report

在以上的字符串中,我想用正则表达式(c#)
提取MIME-Version: 1.0
Content-Type: Multipart/report;
report-type=delivery-status;
这些内容 该如何写? --------------------编程问答--------------------
MIME-Version[\s\S]+(?=---)
--------------------编程问答--------------------
str = Regex.Match(str,"MIME-Version:.*?report-type=[^;]*;").Value;
--------------------编程问答-------------------- MIME-Version:.* Content-Type:.*report-type=.* --------------------编程问答-------------------- MIME-Version[\s\S]+(?=---)
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,