日期:2014-05-20 浏览次数:20773 次
public static void main(String[] args) { String str = "aaaaa<img src=\"http://ctffamily.com/images/f/12.gif\" width=\"24\" " + "height=\"24\">nnnnnnnn<img src=\"http://ctffamily.com/images/f/6.gif\" " + "width=\"24\" height=\"24\">bbbbbbbbbbbbbbbbbb"; str = str.replaceAll("<img.*?src=.*?/([^/]*?)\\.gif.*?>", "$1"); System.out.println(str); }