I can't get your regular expression to work with preg_match. It gives me following error:
"reference to non-existent subpattern at offset 39"
I just need a regular expression that matches strings like:
http://domain:optionalport/filename path with any kind of character in it (not only alphanumeric characters).jpg or png extension