[email protected]   (host mail.ctrip.com[218.244.111.9] said: 550 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table (in reply to RCPT TO command))取said:后面的字符串

解决方案 »

  1.   

    向后查看,(?<=查看内容)
    又学到了,呵呵
    ^(?<=said:)(.)+$
      

  2.   

    //取said:后面的字符串
    楼主题意不清楚,没说said:要不要,也没说是要1个以上字符,还是可以为空
      

  3.   

    string test="[email protected]   (host mail.ctrip.com[218.244.111.9] said: 550 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table (in reply to RCPT TO command))";
    System.Text.RegularExpressions.Match match=System.Text.RegularExpressions.Regex.Match(test,@"(?<=said:)(.)+",System.Text.RegularExpressions.RegexOptions.IgnoreCase);
      

  4.   

    //要said:后面的所有
    如果said:后面没有字符也可以吗?
    ^(?<=said:)(.)*$
      

  5.   

    to petshop4(除了吃饭睡觉 还会点正则) :
    为什么不用^,不是开头都要加^的吗