String regex="\\b(?<=(href=\"))[^\"]*?(?=\")"; Pattern pattern = Pattern.compile(regex); Matcher m = pattern.matcher(str_YourHtmlHere); while(m.find()) { System.out.println("FOUND: " + m.group()); }