Bonjour,
J'ai un problème dans mon code source :
L'instruction suivante myPattern.matcher(chaine) affiche une erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 String url1 ="http://www.google.tn/search?q="+text.toString()+"&hl=fr&sa=N&num=10&start="; String exp = "<h3 class=\"r\"><a href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))"; List <NameValuePair> nvps = null; Pattern myPattern = Pattern.compile(exp.toString(),Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.MULTILINE); String chaine = GetHTML(url1,nvps); int pos_page = 0; CharSequence myStringList; for (Pattern Tag : myPattern.matcher(chaine))Quelqu'un saurait-il m'expliquer d'où peut venir le problème ?Can only iterate over an array or an instance of java.lang.Iterable
Merci d'avance pour votre aide.
Partager