I need to extract all links at images in a document HTML. Actually I can extract the href attribute value using this RegExp:
private static final String HTML_A_HREF_TAG_PATTERN =
"\\s*(?i)href\\s*=\\s*(\"([^\"]*\")|'[^']*'|([^'\">\\s]+))";
I need to fetch only the link to images, so I have to check, if the string match with images extension (jpg, jpeg, png, gif).
How can I modify my pattern?