更新时间:2023-02-26 20:17:29
^是一个特殊字符。您需要使用\\ ^
hey . i am using "Split" method but i have a problem . when i use a "^" character as a boundary between my words it cant separate them ! but if i use "/" instead , it works very well ! what is it's problem ?!
its my code with "/" : it works well !
String serverResponsesArray[]=new String [3];
serverResponsesArray=Data.split("/",3);
now if i change "/" to "^" it doesnt work !
String serverResponsesArray[]=new String [3];
serverResponsesArray=Data.split("^",3);
The ^ is a special character. You will need to escape it with "\\^"