Tutorial
Tutorial
From a first scan to the whole pattern language, one short chapter at a time, with the command line, Rust, Python and PowerShell side by side. Read the pages in order:
- Getting started - install trex, run a first scan, read its output.
- Your first patterns - the token atoms, alternatives, repetition and lenses.
- Binding and balance - registers compared later in the match, balanced brackets, and a look-ahead for a literal.
- Axes and tools - read an axis, query it from a pattern, and rewrite what a pattern finds.
- Beyond regex - anchors, lookaround, the three kinds of choice, atomic groups, symmetry scopes and token classes, then shapes you declare, construct anchors and thresholds read from the stream.