正则表达式懒惰匹配 一个表达式诸如/book/title/name想要匹配成/book,/title,/name 正则表达式怎么写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 没用到贪婪匹配 你看下面的怎么样: String s="/book/title/name"; String regex="/\\w+"; Pattern p=Pattern.compile(regex); Matcher m=p.matcher(s); while(m.find()){ System.out.println(m.group()); } 大家来看看这个二维数组为什么抛异常 请问有使用过substance L&F么? 在其中使用JFileChooer出错 作为大三的学生,压力很大,并且前途十分迷茫,何去何从? java文件读写问题 做jsp页面 什么时候才能用到线程? java中有没有跳出程序的语句,类似vb中的exit sub语句 messagebox()..如何实现?????? 求关于xml解析程序实例,和生成xml程序的实例 通过网络发送中文字符串的问题 ***急!关于JBuilder5注册*** 关于if语句的问题 JTable 分页后,当进行非最后页的数据库操作时就死。
你看下面的怎么样:
String s="/book/title/name";
String regex="/\\w+";
Pattern p=Pattern.compile(regex);
Matcher m=p.matcher(s);
while(m.find()){
System.out.println(m.group());
}