Skip to content

1 or 2 credits, some free · 1 credit is about $1

pocketshelf

Regex Pack: IDs, Codes and Formats

A 1-page snippet pack for validating identifiers and codes: 10 short entries with copy-ready code.

ForDevelopers

regex-pack-ids-and-codes.pdfShowing 10 of 39 lines
// UUID v4
const pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
pattern.test("3f2504e0-4f89-41d3-9a0c-0305e82c3301"); // true

// Git commit hash
const pattern = /^[0-9a-f]{7,40}$/;
pattern.test("a1b2c3d"); // true

// MAC address
const pattern = /^(?:[0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/;

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-ids-and-codes.pdfPDF · 19 KB
  • regex-pack-ids-and-codes.mdMarkdown · 2 KB
  • regex-pack-ids-and-codes.jsJS · 1 KB
  • LICENSE.txtadded to every download

About this item

A compact, printable snippet pack for validating identifiers and codes. 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.

  • Regex
  • Identifiers
  • Formats
  • Snippets
  • Validation

Reviews

No reviews yet.

You might also grab