I am trying to tokenize strings which includes quotes. I searched and found StringTokenizer class. But it didn't worked for me. Here is an example of the string I expect user to enter:
dgdfgg ddfgdf 4 12 assdsd “michael smith” “michael Westley” “Michael Fotky”
Problem is tokenizer tokenizes words. But as you see there is quotes and I want them to stay together. Like “michael Westley” should stay together as a token. Not like “michael and Westley”. I could use str.nextToken()+str.nextToken()
But Idont know if string inside the quotes will be one word or two words. If it is one word it could be a problem. And Here is a example of what I want:
dgdfgg
ddfgdf
4
12
assdsd
“michael smith”
“michael Westley”
“Michael Fotky”
Thanks In advance.