String info = "<div>Sprider Programming<a href="/" mce_href="/""http://www.google.com/"></a></div><a href="/" mce_href="/""http://168.168.172.34:678/Sprider/index/aspx/"></a>"; Pattern pattern = Pattern.compile("(?i)href(?-i)//s*=//s*/"(.*?)/""); Matcher matcher = pattern.matcher(info); while (matcher.find()) { System.out.println(matcher.group(1)); }