67,515
社区成员
发帖
与我相关
我的任务
分享
String url = "http://topic.csdn.net/u/20091019/10/f8173f20-5eda-438b-a8ae-17e3ff9ec94e.html?40383";
String pattern = "(http://)?([^/]*)(/?.*)";
System.out.println(url.replaceAll(pattern, "$2"));