Bonjour,
je cherche à faire un split sur une String avec séparateur \ mais cela me sort une exception :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
Exception in thread "main" java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
Le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
String test = "c:\\toto\\tutu";
System.out.println(test);
String split[] = test.split("\\");
System.out.println(split[1]);
Si qqun a une idée
Merci !