New: Try Voli The Bear, Fast package manager (and not only) for Windows
All topics / Regular Expressions, Explained

Regular Expressions, Explained

A regex is a pattern that describes the shape of text - not code you run, but text you describe. Learn the mental model, the small toolkit you'll use 90% of the time, and how to avoid the classic traps.

Download EPUB
  1. What a Regex Actually Is A regex is a pattern that describes the shape of text. You don't write code that searches - you describe what you're looking for, and a regex engine does the searching.
  2. The Core Toolkit The pieces you'll use 90% of the time: literals, character classes (\d \w \s and [...]), quantifiers (* + ? {n}), anchors (^ $), and groups (...) - built up to matching a real date.
  3. Using Regex for Real (and the Gotchas) Where you actually meet regex - editor search/replace, grep, and code - and the classic traps: greedy vs lazy matching, escaping special characters, and regex becoming write-only. The cure is to test on real samples and build incrementally.