5
Quiero dividir una cadena en Android usando Java. He hecho esto antes, pero ahora tengo esta excepciónDivisión de una cadena en Java throws PatternSyntaxException
11-20 17:57:37.665: ERROR/AndroidRuntime(25423): java.util.regex.PatternSyntaxException: Syntax error U_REGEX_MISMATCHED_PAREN near index 1:
11-20 17:57:37.665: ERROR/AndroidRuntime(25423): (
11-20 17:57:37.665: ERROR/AndroidRuntime(25423):^
Mi cadena es como
String mystring= "iamhere(32)";
y quiero mantener sólo el "iamhere".
que dividirlo usando
String[] seperation = mystring.Split("(");
¿Qué estoy haciendo mal?
que tienen intentado utilizar mystring.Split ("\\ (");? –
problemas de expresiones regulares ... –
Recibo un error cuando uso ("\ (") intenté usar ("\\ (") y lo entendí bien:) – user878813