First let me tell you where I'm coming from. I have a string that is the html code from a website, i got this using JSOUP. Anyways so the html is all in the string and I can print it to a text file. So I'm trying to get songs from inside this code and each song is by the same "tags"
this is a line from the text file i printed it to
<div class="title" itemprop="name">
Wrath
</div> </td>
In notepad it looks like a line but when you copy and paste it it looks like this. So what I want is the wrath in the middle so i tried to make a pattern to find it using help from this other stack post:Java regex to extract text between tags
This is the part of my code that has to do with this
Pattern p = Pattern.compile( "<div class=\"title\" itemprop=\"name\">(.+?)</div> </td>");
Matcher m = p.matcher( html );
while( m.find()) {
quote.add( m.group( 1 ));
}
When it runs it shows that there is nothing in the ArrayList quote. This might not be working because it counts the space in between. Any Ideas?