i need to compile a pattern in order to have the name of the span but in vain i can't have what i want may be it's the way that this pattern is written i know that i made something not totaly correct .. this is my html code :
<span class="libelleAttributPageParametrage">
"Libellé de facturation"
<font color="#C60307">*</font>
</span>
and this is my java code :
public List<String> getAllSpan()
{
String HTMLSource = priceSelenium.getHtmlSource();
priceSelenium.getBodyText();
List<String> ListOfSpan = new ArrayList<String>();
Pattern p = Pattern.compile( "<SPAN[^>]*>([\\w\\d\\s\\n\\r()/°@\\.\\-àáâãäåçèéêëìíîïðòóôõöùúûüýÿ]*)</SPAN>" );
Matcher m = p.matcher( HTMLSource );
while ( m.find() )
{
if ( !m.group( 1 ).isEmpty() )
{
ListOfSpan.add( m.group( 1 ) );
}
}
return ListOfSpan;
}
and what i need to have in my ListOfSpan is :"Libellé de facturation"
thanks in advance