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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/119743-need-regular-expression/#findComment-616931 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.