Modified regex to be stricter with input