C#取中间文本

用户反馈 |浏览1150次
收藏|2020/01/15 09:07

2020/01/15 09:14

C#用正则来实现的,如你要取文本中的数字,可用 string input = "你的数据为:1905。谢谢使用。"; string pattern = @"\d+"; foreach (Match match in Regex.Matches(input, pattern)) Console.WriteLine(match.Value);结果为1905
匿名

其他回应(0)
0人关注该问题
+1

 加载中...