正则表达式练习题
2012-07-05 23:40
113 查看
1.解析IP
提取数字namespace 提取数字 { class Program { static void Main(string[] args) { string str = "hello,2010年10月10日是个好日子。恩,9494.吼吼!886."; MatchCollection ms = Regex.Matches(str, @"\d+"); foreach (Match m in ms) { if (m.Success) { Console.WriteLine("{0}\t\r\n", m.Value); } } Console.ReadKey(); } } }
相关文章推荐
- Python正则表达式练习题
- 正则表达式八道练习题
- 一道练习题引申出来的知识点(二) 正则表达式
- 正则表达式练习题及答案
- 正则表达式
- 正则表达式^什么时候是开始,什么时候是否
- hql和sql练习题
- 算法第四版练习题答案
- linux中的glob、grep、正则表达式
- 数据结构与算法分析(第3版)练习题-第3章-表、栈和队列
- 正则表达式分组、断言详解
- 50道JAVA基础编程练习题 - 题目
- 正则表达式 基础认识
- unit9练习题
- 正则表达式
- PAT乙级(Basic Level)练习题 >NowCoder数列
- 正则表达式
- 线段树练习题二
- Python正则表达式中文手册
- 动态规划练习题-13(最大上升子序列和)