Working in reg def and reg exp