What it does
Find text shaped like YYYY-MM-DD.
How to use it
- Load the example or paste your text.
- Check the matches and the counterexample.
- Validate the dates separately if they must be real calendar dates.
Verified example
Example
Text "on 2026-09-24 and 2026-10-01"
\b\d{4}-\d{2}-\d{2}\b Result: "2026-09-24", "2026-10-01"
\b\d{4}-\d{2}-\d{2}\b Result: "2026-09-24", "2026-10-01"
\b\d{4}-\d{2}-\d{2}\b Result: "2026-09-24", "2026-10-01"
\b\d{4}-\d{2}-\d{2}\b Result: "2026-09-24", "2026-10-01"
Counterexample
Text "2026/09/24"
\b\d{4}-\d{2}-\d{2}\b Result: no match
\b\d{4}-\d{2}-\d{2}\b Result: no match
\b\d{4}-\d{2}-\d{2}\b Result: no match
\b\d{4}-\d{2}-\d{2}\b Result: no match
Recorded by running fixture FX-R03 on : rp.js@1 on Node v24.21.0 (V8), v24.21.0, CPython 3.14.2 (Pyodide 314.0.7), PCRE2 10.48, go1.27.1. JavaScript results come from the rp.js@1 core on Node’s V8; your browser runs the same core.
Engines
- \d is ASCII digits in JavaScript and Go, and any Unicode decimal digit in Python re unless flag a is set.
Limits
- This checks the shape only: 2026-02-31 has the shape and is not a calendar date.