java - Splitting a string on special char -


i have string "0000_clothing|0000_clothing_men's|0000_clothing_men's_shirts", , wanted split string on "|".

string catarray[] = catcontext.split("|"); 

the above mentioned code splitting string seperate characters 0,0,0,0,_,c including | symbol.

what missing here?

| regex metacharacter, escape "\\|"


Comments