Will this still create an empty token if there are two consecutive (non-empty) matches?
assert(splitter("texxt", regex("x?")).equal(["t", "e", "", "t"]));