StringTokenizer problem when using newline as delimiter ???
807580Mar 9 2010 — edited Mar 9 2010Hi,
I may get a string value as "\\n" or "\\t" or "\\s".
I need to use them and tokenize a string based on the escape character given.
When i tokenize i come across a weired behaviour as "\\n" is not working where as "\n" is working.
StringTokenizer st = new StringTokenizer(string, "\\n"); --> not working
StringTokenizer st = new StringTokenizer(string, "\n"); --> working
I'm not sure how to extract "\n" or "\t" or "\s" from the above string
so please help how to extract and resolve the tokenize problem.
Thanks,
Kathir