如何用正则表达式"剪掉"部分字符串?

Cro*_*ros 6 c# regex

我需要在C#中剪切并保存/使用部分字符串.我认为最好的方法是使用Regex.我的字符串看起来像这样:

"changed from 1 to 10".

我需要一种方法来删除这两个数字并在其他地方使用它们.这样做的好方法是什么?

tva*_*son 11

错误检查左侧作为练习...

        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 );
Run Code Online (Sandbox Code Playgroud)