Amazon Interview Question

one : Validating Strings with RegEx