这个正则表达式如何写?
对于下面的字符串,我想分别获取冒号后的信息,如何写正则表达式
Content-Type: application/msword;
name="readme.doc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=" readme.doc "
[解决办法]
看看这个能否达到要求
Regex reg = new Regex(@"(?<=[::""][\s\t]*)[^\n"";;\s]+(?=[\s\t]*[;"";\n])"); string input = @"Content-Type: application/msword; name=""readme.doc""Content-Transfer-Encoding: base64Content-Disposition: attachment; filename="" readme.doc """; foreach (Match m in reg.Matches(input)) Console.WriteLine(m.Value);//printapplication/mswordreadme.docbase64attachmentreadme.doc