使用正则表达式提取字符串?
helloworld:myname is tianyaMIME-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