string content = "jul2414:35:49mail2qmail:1185258949.977838delivery1:deferral:202.108.3.231_does_not_like_recipient./remote_host_said:_450_4.7.1_<mail3.job88.cn>:_helo_command_rejected:_host_not_found/giving_up_on_202.108.3.231./"
我用的方法是
if(content1.IndexOf("./remote_host_said:_") >-1)
{
int start = content1.IndexOf("./remote_host_said:_");
int end = content1.Length;

try
{
content1 = content1.Substring(start,end);//此处报错
content1 = content1.Substring(0,content1.IndexOf("_"));
}
catch(Exception e)
{
Console.WriteLine(e.Message.ToString());//索引和长度必须引用该字符串内的位置
}
Console.WriteLine(content1.ToString());
}
else
{
content1 = "其他";
}