Compile regexp once as a class variables.