Date Formats Regex

Date Related

US-Date of Birth (Format expected MM/DD/YY or MM/DD/YYYY)

[13578][-/]31[-/]([0-9]{2}|(19|20)[0-9]{2})|0[13578][-/]31[-/]([0-9]{2}|(19|20)[0-9]{2})

1[02][-/]31[-/]([0-9]{2}|(19|20)[09-]{2})

[13-9][-/]30[-/]([0-9]{2}|(19|20)[0-9]{2})|0[13-9][-/]30[-/]([0-9]{2}|(19|20)[0-9]{2})

1[0-2][-/]30[-/]([0-9]{2}|(19|20)[09-]{2})

[1-9][-/]([1-9]|([12][0-9]))[-/]([0-9]{2}|(19|20)[0-9]{2})|0[1-9][-/]([1-9]|([12][0-9]))[-/]([0-9]{2}|(19|20)[0-9]{2})

1[0-2][-/]([1-9]|([12][0-9]))[-/]([0-9]{2}|(19|20)[09-]{2})

Date of birth in DD/MM/YY or DD/MM/YYYY format (English/Australian format)

30[-/](([13-9])|(1[0-2]))[-/]([0-9]{2}|(19|20)[0-9]{2})

31[-/](([13578])|(1[02]))[-/]([0-9]{2}|(19|20)[0-9]{2})

[1-9][-/]((1[0-2])|([1-9]))[-/]([0-9]{2}|(19|20)[0-9]{2})|[12][0-9]/((1[0-2])|([1-9]))/([0-9]{2}|(19|20)[0-9]{2})

Date of birth in YYYY/MM/DD or YY/MM/DD format (ANSI/International format)

Days 1 thru 29 of the month

[0-9]{2}[-/]((1[0-2])|(0{0,1}[1-9]))[-/](([12][0-9])|(0{0,1}[1-9]))

19[0-9]{2}[-/]((1[0-2])|(0{0,1}[1-9]))[-/](([12][0-9])|(0{0,1}[1-9]))

20[0-9]{2}[-/]((1[0-2])|(0{0,1}[1-9]))[-/](([12][0-9])|(0{0,1}[1-9]))

Days 30 and 31 of the month

[0-9]{2}[-/]((1[02])|(0{0,1}[13578]))[-/]31

19[0-9]{2}[-/]((1[02])|(0{0,1}[13578]))[-/]31

20[0-9]{2}[-/]((1[02])|(0{0,1}[13578]))[-/]31

[0-9]{2}[-/]((1[0-2])|(0{0,1}[13-9]))[-/]30

19[0-9]{2}[-/]((1[0-2])|(0{0,1}[13-9]))[-/]30

20[0-9]{2}[-/]((1[0-2])|(0{0,1}[13-9]))[-/]30

Date of birth with month spelled out

(Please use the pattern and phrases dictionary together - the number of occurrences of each dictionary in the engine should be same number ie if >4 for patterns combine that with >4 for phrases as well)

Pattern dictionary

0[1-9](th|st|nd|rd){0,1}[-/, ].*((1[89])|(20)){0,1}[0-9]{2}

[1-9](th|st|nd|rd){0,1}[-, ].*((1[89])|(20)){0,1}[0-9]{2}

[12][0-9](th|st|nd|rd){0,1}[-/, ].*((1[89])|(20)){0,1}[0-9]{2}

3[01](th|st){0,1}[-/, ].*((1[89])|(20)){0,1}[0-9]{2}

Phrases dictionary

Jan

January

Feb

February

Mar

March

Apr

April

May

Jun

June

Jul

July

Aug

August

Sep

Sept

September

Oct

October

Nov

November

Dec

December


Copyright 2007-2021 ZSCALER, INC.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.