regex to find any date format 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}$