Compile regexp only once