Discrete splitting, matching regexes. Fixes #3 and fixes #1.