Compile a single regex once