-4
A
回答
0
举个例子,从您的字符串得到的数字的两个街区[111 abc.def.ghi 111]
string regexPattern = @"\d+";
string input = @"[111 abc.def.ghi 111]";
foreach (Match m in Regex.Matches(input, regexPattern))
{
Console.WriteLine("{0}, {1}", m.Value, m.Index);
}
相关问题
- 1. C++正则表达式与提升正则表达式
- 2. C#正则表达式模式难题
- 3. C#正则表达式模式匹配
- 4. 正则表达式c#模式匹配
- 5. 正则表达式模式C#
- 6. C#正则表达式模式
- 7. 正则表达式模式C#
- 8. 正则表达式与两个模式
- 9. 正则表达式模式
- 10. 正则表达式 - 模式
- 11. 正则表达式模式$
- 12. 正则表达式模式
- 13. 正则表达式模式
- 14. 正则表达式模式
- 15. 正则表达式模式
- 16. 正则表达式正则表达式模仿正则表达式
- 17. 正则表达式正则表达式正则表达式使用正则表达式,但不是与Python
- 18. Nintex正则表达式模式正则表达式
- 19. 设置从正则表达式模式到正则表达式?
- 20. 正则表达式(正则表达式)模式匹配
- 21. Python的正则表达式:“喜欢”正则表达式模式?
- 22. 将C#.Net正则表达式转换为Java正则表达式模式
- 23. 正则表达式模式的正则表达式模式是什么?
- 24. Java正则表达式组与。* vs正常正则表达式
- 25. 正则表达式(正则表达式)
- 26. 正则表达式(正则表达式)
- 27. 正则表达式(正则表达式)
- 28. 比较一些模式与正则表达式C#
- 29. 正则表达式模式不正常
- 30. 用Python正则表达式编译模糊正则表达式
我们可以做到在同一行,而不forecach?因为大部分文本保持不变,只是数字会改变。任何建议? – Speed
即使输入只是[111],您的代码也正在接受。但我需要确保abc.def.ghi也存在。有什么建议吗? – Speed