Playing with Guava I can either set the split to be a single character, a string or a regular expression.
What I want is to split on multiple inputs without having to resort to using regular expressions as I want to built up the separators using method calls.
What I'm trying to do is to get it to let me do something like:
Splitter.on(',')
.on('.')
.on('|')
.on("BREAK")
.splitToList(test);
So for the input "a,b,c.d|e BREAK f" would produce a list containing a/b/c/d/e/f.
This is done within a class I'm writing so maybe construct a regular expression from the inputs when the call is made to finally process the data and use this as the one and only .on() call?
Thanks.
.on('B').on("BREAK"), how would that even work? -- but regexes are certainly the only way to approximate this with Guava'sSplitter. - Louis Wasserman