I'm working on a project with hyperlinks. I need to parse all links from a string in Java, but only http://rapidshare.com links.
All parsed links shoud be filled in an array. My code looks like this:
Matcher mat = Pattern.compile("(\"(.*?)\"|([^,]+)),?").matcher(html);
But it still get other word brackets and links. How can I get this working?
update on quellcode
Matcher mat = Pattern.compile("/href=\\\"(http://(www\\.)?rapidshare.com/.+)\\\"/").matcher(html);
while (mat.find()) {
result.add(mat.group(2) == null ? mat.group(3) : mat.group(2));
}