0

Split function not work !!!!

String str ="Mahmood$_$Ali"; String[] strArray =str.split("$_$"); for(String s : strArray ) System.out.println(s);

5th Feb 2017, 5:10 PM
Mahmood Ali
Mahmood Ali - avatar
5 odpowiedzi
+ 2
Method split uses regular expressions. If you want to prevent that, you have to use the escape sequence: String str ="Mahmood$_$Ali"; String[] strArray =str.split("\\$\\$_\\$\\
quot;); for(String s : strArray ) System.out.println(s);
5th Feb 2017, 5:23 PM
Tashi N
Tashi N - avatar
+ 2
first problem, str.split() you have ... str.splite()
5th Feb 2017, 5:25 PM
LordHill
LordHill - avatar
+ 1
thank you...
5th Feb 2017, 5:43 PM
Mahmood Ali
Mahmood Ali - avatar
0
what
10th Feb 2017, 8:05 AM
Mustafa Al Shammari
Mustafa Al Shammari - avatar
0
is
10th Feb 2017, 8:05 AM
Mustafa Al Shammari
Mustafa Al Shammari - avatar