Dates & Timesflags: g
ISO 8601 Date-Time
Match full ISO 8601 date-times with timezone offset or Z suffix (e.g. 2024-01-15T14:30:00Z).
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+\-]\d{2}:?\d{2}) (flags: g)Raw source: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+\-]\d{2}:?\d{2})
How it works
Date YYYY-MM-DD, literal T, time HH:MM:SS, optional fractional seconds, then either Z or a ±HH:MM / ±HHMM offset.
Examples
Input
2024-01-15T14:30:00ZMatches
2024-01-15T14:30:00Z
Input
2024-03-01T09:00:00.123+05:30Matches
2024-03-01T09:00:00.123+05:30
Input
2024-01-15No match
—Common use cases
- •API response parsing
- •Structured log ingestion
- •Audit event timestamp extraction
- •Cross-timezone analytics
Related patterns
ISO 8601 Date
Dates & TimesMatch dates in ISO 8601 format: YYYY-MM-DD with valid month (01–12) and day (01–31) ranges.
12-Hour Time with AM/PM
Dates & TimesMatch 12-hour time formats with AM or PM suffix — e.g. 9:30 AM, 11:45:15 pm.
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.
European Date Format (DD/MM/YYYY)
Dates & TimesMatch European-style dates in DD/MM/YYYY format with valid day (01–31) and month (01–12) ranges.