相关疑难解决方法(0)

从字符串中查找并提取数字

我需要查找并提取字符串中包含的数字.

例如,从这些字符串:

string test = "1 test"
string test1 = " 1 test"
string test2 = "test 99"
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

.net c# regex string

294
推荐指数
22
解决办法
49万
查看次数

标签 统计

.net ×1

c# ×1

regex ×1

string ×1