1
forreal 2014-11-08 17:55:09 +08:00
(http://[a-zA-Z0-9_\-\.\/]+\.(jpg|png|gif)(\\n)*)
在http://tool.chinaz.com/regex/上简单验证了一下,不知道想得周不周全 ps:印象中/不用转义。但是转义也可以匹配 |
2
sivacohan 2014-11-08 17:55:30 +08:00 via Android
试试在后面写 \n?
|
3
loryyang 2014-11-08 18:00:37 +08:00
|
4
ctsed 2014-11-08 18:05:26 +08:00
/((http[s]?:)?\/\/([\w\-]+\.)*[\w\-]+\.\w{2,10}(:\d{1,5})?\/[\d\D]*\.(jpg|png|gif|bmp|jpeg|ico)(\?([\w\-]+(=[\w\-]+)?[&]?)+)?)([\s#]?)/gim
http://www.example.com/abc.jpg?v=123 //w.w.w.example.com:8080/?name=abc.jpg |
5
ctsed 2014-11-08 18:11:35 +08:00
/((http[s]?:)?\/\/([\w\-]+\.)*[\w\-]+\.\w{2,10}(:\d{1,5})?\/[^\s#]*\.(jpg|png|gif|bmp|jpeg|ico)(\?([\w\-]+(=[\w\-]+)?[&]?)+)?)([\s#]?)/gim
|