Regex Pack: Dates, Times and Numbers
A 1-page snippet pack for matching dates, times and numbers: 10 short entries with copy-ready code.
ForDevelopers
// 24-hour time
const pattern = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/;
pattern.test("09:30"); // true
// 12-hour time
const pattern = /^(?:0?[1-9]|1[0-2]):[0-5]\d\s?(?:am|pm)$/i;
pattern.test("9:30 am"); // true
// US date
const pattern = /^(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12]\d|3[01])\/\d{4}$/;What's inside
- Format
- PDF, Markdown, JS
- Contents
- 10 patterns
- Version
- 1.0 · Updated 3 Oct 2026
- Licence
- Commercial What this means
- Checked
- Checked before it ships
- regex-pack-dates-and-numbers.pdfPDF · 19 KB
- regex-pack-dates-and-numbers.mdMarkdown · 1 KB
- regex-pack-dates-and-numbers.jsJS · 957 B
- LICENSE.txtadded to every download
About this item
A compact, printable snippet pack for matching dates, times and numbers. Each of the 10 entries has a one-line explanation and a small example you can paste into your editor. The PDF uses a two-column A4 layout designed to sit next to your keyboard, and the same content ships as Markdown so you can search it or drop it into your notes, plus a JavaScript module that exports every pattern. Every JavaScript example targets ES2023.
Reviews
No reviews yet.