Hi,
I'm trying to use the StringTokenizer to split a string into peaces on dual pipes ||
The string looks like this:
"abcd||efgh|ijklm||nopqr"
This is the result i want
{abcd, efgh|ijklm, nopqr}
I'm have used the following code:
tokenizer = new StringTokenizer("abcd||efgh|ijklm||nopqr", "\\|{2}");
tokenizer = new StringTokenizer("abcd||efgh|ijklm||nopqr", "\\|\\|");
tokenizer = new StringTokenizer("abcd||efgh|ijklm||nopqr", "\\||");
tokenizer = new StringTokenizer("abcd||efgh|ijklm||nopqr", "||");
The end result is almost always that the string is being split on a single pipe
{abcd, efgh, ijklm, nopqr}
How can i use the string tokenizer to split on the dual pipes.
Note: i can't alter the string content to use other delimiters