- No data uploaded
- Instant results
Regex for Date (YYYY-MM-DD)
Pattern: /\b\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])\b/g. Test it below and adapt it to your data — validation regexes are always a trade-off between strictness and real-world inputs.
Regex for Date (YYYY-MM-DD)
Matches/\b\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])\b/g
Released 2026-11-12, patched 2026-13-01 (invalid).
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | 2026-11-12 | 9 | — |
JavaScript (ECMAScript) regular expressions. Without the g flag only the first match is used by String.match — this tester always lists all matches.
Frequently asked questions
Is my data uploaded?
No. The calculation runs entirely in your browser — nothing you type is sent to a server.
Is it free?
Yes — free, unlimited and no sign-up.