english date regex th 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}$