日期:2014-05-19 浏览次数:20710 次
String s = "topic.csdn.net/u/20120604/22/2479ec15-887a-4a7f-9ca6-042d37214302.html"; Pattern p = Pattern.compile("(?<=//|)((\\w)+\\.)+\\w+"); Matcher m = p.matcher(s); if(m.find()){ System.out.println(m.group()); }