1

From a web page, I want to search all h3 whose id starts with 'Tomcat_' and ends with '_released'

<h3 id="Tomcat_9.0.19_Released">
  <span class="pull-right">
    2019-04-13
  </span>
   Tomcat 9.0.19 Released
</h3>
Derek Pollard
  • 6,953
  • 6
  • 39
  • 59
Programming-Lover
  • 1,177
  • 10
  • 14

1 Answers1

0

first: excample

DomNodeList<DomElement> ss = page.getElementsByTagName("h3");

and later: excample

String value = temp.getAttribute("id");

if(value.startsWith("Tomcat_")&value.endsWith("_released")){
System.out.println(value);
}