Regexp are compiled only once now

I don't have a database to test, so please verify my code :)