Regular expressions
Read a pattern someone else wrote, and write one that does what you meant.
Written for anyone who has copied a pattern from an answer online and wanted to know what it does. No prior regex needed; some familiarity with a text editor or a programming language helps.
Start: What a pattern actually matches- What a pattern actually matchesA regex is a description of text, tried at every position until something fits.3 min
- Character classes: one of theseSquare brackets describe a single character by listing what it may be.3 min
- Quantifiers: how many, and how greedyQuantifiers repeat the thing before them, and by default they take as much as they can.3 min
- Anchors and groups: where, and which partAnchors tie a pattern to a position; groups decide what you get back.4 min