// joining these should yield the original string static LS splitAtWordBoundaries(S s) { ret regexpExtractAll("\\w+|\\W+", s); }