do not recompile regex patterns each time