Alternative rollup implementation for the rust branch

This is an alternative implementation of #46.
I'd recommend adding a comment explaining the goal of the regex regardless. regexes are great, but a total comprehension blackhole.