regex to check mm/yyyy after year 2000 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}$