gaza165 Posted August 14, 2008 Share Posted August 14, 2008 $pattern = "/http:\/\/[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+/i"; At the moment, this patter looks for website links such as http://www.google.com http://www.yahoo.com I need a regular expression pattern that looks for websites containing image extensions such as http://www.google.com/image.jpg http://www.domain.com/image1.png http://www.domain.com/images/image2.png etc.... hope u can help, thanks Garry Link to comment https://forums.phpfreaks.com/topic/119743-need-regular-expression/ Share on other sites More sharing options...
effigy Posted August 14, 2008 Share Posted August 14, 2008 %http://\S+\.(?:jpe?g|png|gif)%i Link to comment https://forums.phpfreaks.com/topic/119743-need-regular-expression/#findComment-616931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.