simple program to validate input string matches pattern