This content has been marked as final. Show 4 replies
I am trying to develop a software that will be able to identify some characters in a row.use regexp instead :http://java.sun.com/docs/books/tutorial/essential/regex/
But I have realized that the delimiter of the StringTokenizer gets each one by one the characters of the delimiter and not as a whole word.I don't think so. http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html#StringTokenizer(java.lang.String)
If I understand your problem correctly
in the java API the constructor
public StringTokenizer(String str, String delim, boolean returnDelims)
does exactly what you want .. your delimiter can alsoNo, that's even worse: it will return each delimiter character, separately, along with the tokens. @OP, What you want is String's split() method.
be an String..