regex to check mm/yyyy date after 1900 code example Example: use regex to make sure it is a date ^[0-3]?[0-9]/[0-3]?[0-9]/(?:[0-9]{2})?[0-9]{2}$