Bonjour,
J'essaye d'extraire quelques infos à partir d'un string.
Voici mon code :
Je voudrais pouvoir récupérer tous ce qui trouve entre <<......>> et <<.....>>, le code ci-dessous retourne seulement un seul résultat (toto).Code:
1
2
3
4
5
6
7 String aParser="<<qdsdqsd>>toto<<qsdqsdsqd>>titi<<sd>>"; Pattern p=Pattern.compile("<<[a-z]+>>([a-z]+)<<[a-z]+>>"); Matcher m=p.matcher(aParser); while(m.find()) { System.out.println(m.group(1)); }
Merci pour votre aide.