0

i want to parse an html and get the next tag value after a matched pattern. what i am doing Searching the pattern and find it. now i want the next value to be printed .

My current code is:

public class Match {

/**
 * @param args
 */
public static void main(String[] args)  throws IOException {

    System.out.println("nothing to Display");
    String pattern = "Planned Start<BR>Date";
    Pattern regPat = Pattern.compile(pattern);
    Matcher matcher = regPat.matcher("");
    BufferedReader reader =
    new BufferedReader(new FileReader("C:/Users/606787145/Desktop/test.htm"));
    String line;
    int count=0;
    while ((line = reader.readLine()) != null) {
    matcher.reset(line);

    if (matcher.find()) {
       System.out.println(line);
    }
   }
}
4

0 回答 0