moved regex patterns from module scope into class scope