Updated reg_match