Split string and get each values using java -


i have string in following format

duplicate application\your request has been rejected credit bureau server.\entered value lower minimum requirement apply income proof document. please try using other income support document.\validation error. policy criteria not met.\decisioning system unavailable @ moment\decision center error:\we regret not being able take application forward @ point. thank applying. 

now, i'm trying split string using delimiter "\". i'm trying fetch strings , compare string receive response split result each value. i'm not getting exact thing.. here code..

//note scbcc_new string have..  string[] scbccnewarray = scbcc_new.split("/");     for(string results : scbccnewarray) {         log.info("value :"+results)     } 

is right way?

you need escape slash special character in java.

string str = "duplicate application\\your request has been rejected credit bureau server.\\entere"; string[] scbccnewarray = str.split("\\\\"); (string results : scbccnewarray) {      system.out.println("value :" + results); } output: value :duplicate application value :your request has been rejected credit bureau server. value :entere 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -