I've been trying to gather information using regular expressions:
Pattern hp = Pattern.compile("<small>.....</small>");
Matcher mp = hp.matcher(code);
while (mp.find()) {
String grupoHORARIO = mp.group();
System.out.println(grupoHORARIO); }
When I run the program, instead of showing me:
RESULT1
RESULT2
RESULT3
It shows this:
<small>RESULT1</small>
<small>RESULT2</small>
As you see, it shows the opening and closing "small" tags before and after the word I am looking for. What I need is just the word, without the "small" tags around it.