testing re for input validation