Dates & Timesflags: g

US Date Format (MM/DD/YYYY)

Match US-style dates in MM/DD/YYYY format with range validation.

Try it in RegexPro

Pattern

regexJavaScript
/(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12]\d|3[01])\/\d{4}/g

Raw source: (?:0[1-9]|1[0-2])\/(?:0[1-9]|[12]\d|3[01])\/\d{4}

How it works

Month alternation covers 01-12, day covers 01-31, year is any 4-digit number. Slashes are literal separators escaped with \.

Examples

Input

01/15/2024

Matches

  • 01/15/2024

Input

12/31/1999

Matches

  • 12/31/1999

Input

13/01/2024

No match

Common use cases

  • US form date field validation
  • Spreadsheet date column parsing
  • Legacy system data migration
  • Document date extraction
All patternsTest this pattern live →