Como mostrado abaixo:
/ *** Obtenha o endereço da imagem na página da web* @param Define html string*/ public set <tring> getImgstr (string htmlstr) {set <string> pics = new HashSet <String> (); String img = ""; Padrão p_image; Matcher m_image; String regex_img = "<img.*Src // s*= // s*(.*?) [^>]*?>"; p_image = padrony.compile (regex_img, padring.case_insensitive); m_image = p_image.matcher (htmlstr); while (m_image.find ()) {// get <img /> dados img = m_image.group (); // corresponde aos dados SRC em <MG> Matcher M = Pattern.compile ("src // s*= // s*/"? (.*?) (/"|> | // s+)"). Matcher (img); while (m.find ()) {pics.add (m.group (1)); }} retornar fotos; }O método do artigo acima Java para obter o conteúdo no SRC na tag IMG no texto HTML é todo o conteúdo que compartilho com você. Espero que você possa lhe dar uma referência e espero que você possa apoiar mais o wulin.com.