Code string x ="Live for nothing,die for something"; Regex r1 =new Regex(@".*thing"); if (r1.IsMatch(x)) { Console.WriteLine("match:"+ r1.Match(x).Value);//输出:Live for nothing,die for something } Regex r2 =new Regex(@".*?thing"); if (r2.IsMatch(x)) { Console.WriteLine("match:"+ r2.Match(x).Value);//输出:Live for nothing }