Create rule regexp ahead of time