I want to split the following string “Good^Evening” i used split option it is not split the value. please help me.
This is what I’ve been trying:
String Val = "Good^Evening";
String[] valArray = Val.Split("^");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming you did something like:
That doesn’t work because the argument to
splitis actually a regular expression, where^has a special meaning. Try this instead:The
\\is really equivalent to a single\(the first\is required as a Java escape sequence in string literals). It is then a special character in regular expressions which means “use the next character literally, don’t interpret its special meaning”.