67,513
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) {
String str = "<img border=\"0\" alt=\"点击查看大图\" onload=\"autoPicWidth(this);\" src=\"/News/2013117/2013cfn/Pic/20131171122421683476611426.jpg\"/>";
Pattern p = Pattern.compile("src=\"(.*)\"/>");
Matcher m = p.matcher(str);
if(m.find()){
System.out.println(m.group(1));
}
}