Splitting input text lines at word delimiters
.,:;?!" or
white space characters may be achieved by means of
split(...)
and the regular expression String
regex = "[ \t\"!?.,'´`:;]+";. This “+”
sign indicates the appearance of a succession of one ore
more character element from the set \t\"!?.,'´`:;.
Thus a text That's it.
Next try will be split into a string array
{"That", "s", "it", "Next",
"try"}.
Write a Junit test which reads
from a given input file and compares its result with a hard
coded set of expected strings.