European Date Format (DD/MM/YYYY)
Match European-style dates in DD/MM/YYYY format with valid day (01–31) and month (01–12) ranges.
Try it in RegexPro →Available in
JavaScript / ECMAScript code
const re = new RegExp("(?:0[1-9]|[12]\\d|3[01])\\/(?:0[1-9]|1[0-2])\\/\\d{4}", "g");
const input = "15/01/2024";
const matches = [...input.matchAll(re)];
console.log(matches.map(m => m[0]));Uses `String.prototype.matchAll` for global iteration (Node 12+ / all modern browsers).
Python (re) code
import re
pattern = re.compile(r"(?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|1[0-2])\/\d{4}")
input_text = "15/01/2024"
for m in pattern.finditer(input_text):
print(m.group(0))Stdlib `re` module — no third-party dependency. Works on Python 3.6+.
Go (RE2) code
package main
import (
"fmt"
"regexp"
)
func main() {
re := regexp.MustCompile(`(?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|1[0-2])\/\d{4}`)
input := `15/01/2024`
for _, match := range re.FindAllString(input, -1) {
fmt.Println(match)
}
}Uses `regexp.MustCompile` (panics on bad patterns at startup) and `FindAllString` for all matches.
Pattern
(?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|1[0-2])\/\d{4} (flags: g)Raw source: (?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|1[0-2])\/\d{4}
How it works
Examples
Input
15/01/2024Matches
15/01/2024
Input
31/12/1999Matches
31/12/1999
Input
32/01/2024No match
—Common use cases
- •EU form date validation
- •Logistics document parsing
- •Legacy date format conversion
- •Internationalisation tooling
Related patterns
US Date Format (MM/DD/YYYY)
Dates & TimesMatch US-style dates in MM/DD/YYYY format with range validation.
ISO 8601 Date
Dates & TimesMatch dates in ISO 8601 format: YYYY-MM-DD with valid month (01–12) and day (01–31) ranges.
24-Hour Time
Dates & TimesMatch 24-hour time formats HH:MM or HH:MM:SS with valid hour (00–23) and minute/second (00–59) ranges.
ISO 8601 Date-Time
Dates & TimesMatch full ISO 8601 date-times with timezone offset or Z suffix (e.g. 2024-01-15T14:30:00Z).