Regex reg = new Regex("(?<=<a href=mailto:)[^~]*?(?=>)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
         MatchCollection mc = reg.Matches(strHtml);
         for (int i = 0; i < mc.Count; i++)
         {
            checkedListBox1.Items.Insert(0, mc[i].ToString());
         }

解决方案 »

  1.   

    \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
      

  2.   

    \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
      

  3.   

    "(?<=<a href=mailto:)[^~]*?(?=>)" 
    先谢谢大家的热心肠,我想做的是提取<a href=mailto:[email protected]>代码中的[email protected],也就是任意两段代码的中间一部分代码
      

  4.   

    ^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$
      

  5.   

    "(?<=<a href=mailto:)[^~]*?(?=>)" 
    先谢谢大家的热心肠,我想做的是提取<a href=mailto:[email protected]>代码中的[email protected],也就是任意两段代码的中间一部分代码