有这样的字符串
From: "exmaple" <[email protected]>怎么把这字符串分出[email protected]谢谢

解决方案 »

  1.   

    "(?i)[a-z]+@\d+\.com"
    多给些例子
      

  2.   

                string s = "From: \"exmaple\" <[email protected]>";
                Match match = new Regex(".+<(.+)>").Match(s);            Console.WriteLine(match.Groups[1]);
      

  3.   

    try...string test = "From: \"exmaple\" <[email protected]>";
    Regex reg = new Regex(@"(?is)from:[^<>]*<([^<>]*)>");
    MatchCollection mc = reg.Matches(test);
    foreach (Match m in mc)
    {
        richTextBox2.Text = m.Groups[1].Value + "\n";
    }
      

  4.   

                最简单的代码:
           string temp3 = @"From: "+"exmaple"+" <[email protected]>";
                string[] temp4 = temp3.Split('<','>');
           string strYouWantGet = temp4[1];
      

  5.   

    这个要用正则表达式?你只是想取<>里面的值啊。