16,556
社区成员
发帖
与我相关
我的任务
分享
Dim text As String = File.ReadAllText("test.txt")
Dim value() as string = text.split()
for each i as string in value()
msgbox(i.charat(1))
next
Dim text As String = File.ReadAllText("test.txt")
For Each m As Match in System.Text.RegularExpressions.Regex.Matches(text,@"(?m)(?<=^#)\d+")
//m.Value就是你要的结果
Next
string text = File.ReadAllText("test.txt");
foreach(Match m in Regex.Matches(text,@"(?m)(?<=^#)\d+"))
{
//m.Value就是你要的结果
}