Remove regex compilation from deep loop.

It has the side effect that if the compilation fails it fails early.
Merge pull request #2 from enovance/ref/minimize_regex_compilation

Remove regex compilation from deep loop.