Tested regular expressions you can open in the tester, read the explanation of and adapt. Each pattern comes with sample text and unit tests. Save your own pattern with Save & share and tick “publish” to add it here.
5 patterns
\b(?<year>\d{4})-(?<month>0[1-9]|1[0-2])-(?<day>0[1-9]|[12]\d|3[01])\b
Dates in ISO 8601 format with month 01–12 and day 01–31, with named groups year, month and day. Does not check days per month.
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?
2026-11-12T08:30:00Z style timestamps with optional fraction and time zone offset.
\b(1[0-2]|0?[1-9]):([0-5]\d)\s?([AaPp][Mm])\b
1:00 to 12:59 followed by am/pm in any case, with or without a space.
\b([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?\b
Times from 00:00 to 23:59 with optional seconds.
\b(0?[1-9]|[12]\d|3[01])([/.-])(0?[1-9]|1[0-2])\2(\d{4})\b
Day/month/year dates with / . or - separators (the same separator twice, checked with a back reference).