I have found useful regex expressions from the site, but this particular one eludes me.
Basically, I need to extract this:
/uploadedimages/space earth nasa hd wallpapers 62.jpg?n=6965
from this string using regex:
<p>test <a href=\"http://www.hotmail.com?id=1\" title=\"james\">james</a> <a href=\"http://mail.gmail.com/index.asp?id=1\" title=\"lafferty\">lafferty</a> <a href=\"https://mail.google.com/index.asp?id=1\" title=\"joseph\">joseph</a> <strong>swami</strong> is a <a href=\"http://mail.yahoo.com/tests?id=1\" title=\"great\">great</a> guy.<img src=\"/uploadedimages/space earth nasa hd wallpapers 62.jpg?n=6965\" alt=\"nasa1\" title=\"nasa1\" style=\"width: 100px; height: 57px; \" width=\"100\" height=\"57\" /></p>\r\n<p><br /></p>\r\n<p><br /></p>
The regex expression I have extracts the URL without the query string. It is ok if the regex hard codes the string '/uploadedimages/'. However, other than this hard-coding, everything else needs to be generic. This could be anything - not just an image, could be an href linked to a pdf file. Query string could be anything valid as well.
Other regex expressions I have found work only with the absolute URLs starting with http, etc.