finished the regex to validate the user input