J'ai un problème avec la recherche d'un caractère spécial « (».
j'ai eu un java.util.regex.PatternSyntaxException exception has occurred
.
Il pourrait avoir quelque chose à voir avec « (» être traité comme un caractère spécial. Je ne suis pas très bon avec motif expression. quelqu'un peut-il me aider bien des recherches pour le caractère d'échappement?Comment rechercher un caractère spécial dans une chaîne java?
// I need to split the string at the "("
String myString = "Room Temperature (C)";
String splitList[] = myString.split ("("); // i got an exception
// I tried this but got compile error
String splitList[] = myString.split ("\(");
Ok merci beaucoup, ça marche. – tadpole