提取邮件信息的正则表达式问题
Message-ID: <1236317901.49b0b6cd82bf6@webmail.stu.edu.cn>
Date: Fri, 6 Mar 2009 13:38:21 +0800
From: yzl@stu.edu.cn
To: liuzhou1986@foxmail.com
Subject: =?GB2312?B?09bSu7TO?=
MIME-Version: 1.0
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.1
我想提取发件人yzl@stu.edu.cn这个地址,代码是
Match match = null;
match = Regex.Match(邮件信息, @"From:\s*(?<From>.*)$", RegexOptions.Multiline);
if(match.Success)
txt_GetSome.Text = match.Groups["From"].Value;
但是返回的是yzl@stu.edu.cnTo: liuzhou1986@foxmail.comSubject: =?GB2312?B?09bSu7TO?=等等,把From后面的全提取上来了,
请问怎么改才能只提取yzl@stu.edu.cn