Regex compiling should only be done once

Otherwise you're defeating the purpose of compiling regex at all. :)