You can use the StringTokenizer. You can set "\" asyour delimeter (or mark for separating the strings)and transfer each part to an array.