This is the text:
<div class="center-content"> <h2> <a href="https://lapiedradesisifo.com/2019/11/04/la-silenciosa-linea-del-idioma-no-hablado/" class="l:3207185" > La silenciosa línea del idioma no hablado </a>
My code:
Pattern p = Pattern.compile("<div class=\"center-content\"> *<h2> <a.{10,200} >(.{50,200})</a>");
Matcher m = p.matcher(text);
StringBuilder sb = new StringBuilder();
while(m.find()){
sb.append(m.group(1) + "\n");
}
System.out.println(sb.toString());
This is what I expected to be printed on the screen:
"La silenciosa línea del idioma no hablado"
But nothing is being printed, I really don't know why because I've tried it with similar examples and it works.
I gotta be honest, I got this regex with some help and I still don't really understand how it works, would really appreciate some help with this one.