Tag Content Extractor

  • + 0 comments
    Pattern p = Pattern.compile("<(.+)>([^<]+)</\\1>");
    Matcher m  = p.matcher(line);
    if (m.find()){
        do {System.out.println(m.group(2));}
         while (m.find());
                }
    else{System.out.println("None");}