public string GetEmail(string oriText)
{
string x = @"/w+([-+.]/w+)*@/w+([-.]/w+)*/./w+([-.]/w+)*";
MatchCollection Matches = Regex.Matches(oriText, x, RegexOptions.IgnoreCase);
StringBuilder sb = new StringBuilder();
foreach (Match NextMatch in Matches)
{
// sb.Append(NextMatch.Value+",");
sb.AppendFormat("{0};", NextMatch.Value);
}
return sb.ToString();
}
正则取邮箱
最新推荐文章于 2024-07-17 16:31:31 发布