Pattern library / Dates & Time
Regex to Match European Dates (DD/MM/YYYY)
European day-first format with range limits on day (01-31) and month (01-12). Use when GA4 or BigQuery data is stored day-first.
How the pattern works
(0[1-9]|[12][0-9]|3[01])— day 01-31.(0[1-9]|1[0-2])— month 01-12.[0-9]{4}— four-digit year.- Swap separators for
.(German) or-as needed.
Test it: match & no-match examples
Every row is loaded straight into the tester — click Try to see the match live:
| Input | Result | Why | |
|---|---|---|---|
28/10/2026 | Match | valid EU date | Try → |
31/12/1999 | Match | year end | Try → |
32/10/2026 | No match | day 32 rejected | Try → |
28/13/2026 | No match | month 13 rejected | Try → |
2026-10-28 | No match | wrong separator/order | Try → |
Where to use it
JavaScript
const re = /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/[0-9]{4}$/;
re.test('28/10/2026'); // true
Python
import re
re.match(r'^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/[0-9]{4}$', '28/10/2026')
Common mistakes
Test this pattern on your own data
Paste it into the free tester with your real strings — nothing leaves your browser.
FAQ
Related patterns
For GA4-specific patterns, see the GA4 regex cheat sheet, the page path regex guide, the event filter regex guide, the GA4 regex match types, the custom channel grouping guide and RE2 vs PCRE. Browse the full regex pattern library.