Jump to content

Need Regular Expression!!


gaza165

Recommended Posts

$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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.