end in a common image type such as jpg, gif, png. 
And starts with the url starts with http

匹配格式可以http://***.(jpg|png|gif)

解决方案 »

  1.   

    /http:\/\/([\w%]+)([\/\.][\w%]+)*\.(jpg|png|gif)/g
    输入:
    "http://csdn.net/1.gif" "http://csdn.net/ 2.gif"
    "http://csdn.net/1.html" "http://csdn.net/2.gif"
    "http://csdn.net/1.png.gif" "http://csdn.net/%u2323%52.gif"处理结果 (4)
    "【http://csdn.net/1.gif】" "http://csdn.net/ 2.gif"
    "http://csdn.net/1.html" "【http://csdn.net/2.gif】"
    "【http://csdn.net /1.png.gif】" "【http://csdn.net /%u2323%52.gif】"