Hello every body!

I am writing a program that tokenizes a text file. I would like to tokenize a line into tokens whenever I found ".a" or ".b" or ".c".
But I don't want to if there is only . or a or b or c.

Is it possible to do that using stringtokenizer?


Thanks in advance.
I do apologise if my question is a stupid one and is not understandable. I am also weak in English.

What is the format of the file?

For instance, if for each line it was: .a tok1 tok2 tok3 Or similar, you could split the line with the split() method of the String class and then test the first element (using .equals()) to see if it is .a or either of the others.

How you would approach a problem like this is largely down to the format of the data you are processing.