CIAO SAPETE DIRMI PERCHè NON mi riempie la tabella a seconda che metta:
codice:
<TITLE>(.*?)</TITLE>|
in questo caso NON riempie nulla,ma MI stampa group2... oppure
codice:
<TITLE>(.*?)</TITLE|>
in questo caso MI RIEMPIE la taballa ma NON trova nulla nel gruppo 2, ho solo provato a stampare group2 ma è null????
codice:
String content = leggiContent(files[i], "iso-8859-1");
String nomeFiles = files[i].getName();
String regex = "<TITLE>(.*?)</TITLE>|"+ //Titolo pagina
"<HTML.*?>(.*?)</HTML>";
Pattern pattern = Pattern.compile(regex, Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(content);
//regular expression per l'estrazione delle info dalle
//pagine
int number=0;
while (matcher.find())
{ result=matcher.group(2);
System.out.println(result);
if (
((nome=matcher.group(1)) != null)
)
{
inserisci(dbConnRet,nome,nomeFiles,path,info[0],files.length + " Files",result);
}
come mai