“从1改为10”.
我需要一种方法来删除这两个数字并在其他地方使用它们.这样做的好方法是什么?
Regex regex = new Regex( @"\d+" ); MatchCollection matches = regex.Matches( "changed from 1 to 10" ); int num1 = int.Parse( matches[0].Value ); int num2 = int.Parse( matches[1].Value );