做课程项目(北大燕园教室查询模块)过程中,遇到一个小问题,需要从字符串中提取一下数字。记录一下。 String str = “一教楼101室” Pattern p = Pattern.compile(“\\d+”); Matcher m = p.matcher(str); m.find(); System.out.println(m.group());//output is 101
android String字符串中提取数字
- Post author By David
- Post date
- Categories In Study
- No Comments on android String字符串中提取数字