Pre-compiles the regular expressions to save computation time

While technically Python does cache the most recently used regexp,
we can't know how many of them it caches.
This way it doesn't have to.