日期:2014-05-19  浏览次数:20998 次

高手帮忙弄个正则
有个string,里面格式如下:

from:XXXX
to:XXXX
msg:XXXXXXXXXXXX
怎么用正则取出:后面的?

谢谢

------解决方案--------------------
try

string yourStr = ............;
MatchCollection mc = Regex.Matches(yourStr, @ "(? <=:).* ");
foreach (Match m in mc)
{
richTextBox2.Text += m.Value + "\n ";
}