PrintableCharts

REGULAR EXPRESSIONS

anchors, classes, quantifiers and groups: what a pattern is made of and how it reads, token by token

Built as a memo rather than a table: the thing worth hanging it up for reads across the room, with the full reference in smaller type below it.

Three sizes in one archive — from a sheet on the fridge to a poster on the wall.

Free

By downloading you agree to the Terms.

Formats
A4 · A3 · A2
What you get
Print-ready PDFs, one per size, with every letterform converted to outlines — nothing to install, nothing to shift.
Subject
code · beginners · reference · study

Syntax follows ECMAScript regular expressions (ECMA-262); the same core is read by PCRE, Python and Java. Every pattern on this sheet is verified by executing it against the strings shown, not by eye.

GREEDY VERSUS LAZY

A quantifier is greedy: it grabs as much as it can and gives back only when the match would otherwise fail. So <.+> on the string <a><b> captures the whole line, from the first < to the last >.

A question mark flips the appetite: <.+?> on the same string yields <a> — the shortest match. One character of difference, the opposite result.

On the sheet

  • Syntax follows ECMAScript regular expressions (ECMA-262); the same core is read by PCRE, Python and Java. Every pattern on this sheet is verified by executing it against the strings shown, not by eye.
  • Colour carries meaning, but meaning never rests on colour alone — the sheet reads in black and white.
  • Nothing about how it was made: the sheet carries only what the reader needs.

Printing

  • Three sizes in the archive: A4 — 210×297 mm, A3 — 297×420 mm, A2 — 420×594 mm.
  • All text is converted to outlines. No fonts to install, and nothing shifts on another machine.
  • White background and sparing fills — it prints on a home printer without draining the cartridge.
  • Margins of at least 10 mm: a home printer cannot print to the edge.
  • No stroke thinner than 0.3 mm, so nothing disappears in print.

Why the numbers can be trusted. Every countable number here is computed from data rather than typed in, and the sheet must pass 7 independent checks before it is allowed to build — how many items there are, the order they come in, and the claim in the highlighted box itself. If one fails, there is no file.

More like this