I need to validate the date format in MM/DD/YYYY. Null is a valid too in my scenario.
This is my regex [0-9]{2}\/[0-9]{2}\/[0-9]{4}$ |
Below image shows the job configuration with my regex
ERROR
You have space after the $ sign, that's why you input doesn't match.
[0-9]{2}\/[0-9]{2}\/[0-9]{4}$ |
// here __^
Remove it ([0-9]{2}\/[0-9]{2}\/[0-9]{4}$
) and, if you want to accept empty string, add empty string with a group, and add beginning of string anchor:
^([0-9]{2}\/[0-9]{2}\/[0-9]{4}|)$
or, better, make the group optional
^([0-9]{2}\/[0-9]{2}\/[0-9]{4})?$