Skip to content

Course

Regex & Text Processing

Regular expressions as a professional tool — how backtracking engines really execute your patterns, captures and lookarounds done right, the performance traps behind real outages, and when grep, sed, awk, or jq (or a real parser) beats a clever regex.

9 lessons

Course Q&A

Reviews

Enrolled members can rate this course.

No reviews yet.

Engines and Mental Models

How engines execute patterns, how quantifiers and anchors really behave, and why the same regex means different things in different tools.

  1. 01How Regex Engines Actually MatchBacktracking versus automata engines, what a choice point costs, and the mental model that lets you predict a pattern's behavior before you run it.22mOpen
  2. 02Quantifiers, Classes, and Anchors: Saying Exactly What You MeanGreedy, lazy, and possessive quantifiers, why negated classes beat lazy dots, and the anchors that turn 'contains' into 'is'.20mOpen
  3. 03Dialects: BRE, ERE, PCRE, JavaScript, and RE2Why a pattern that works in regex101 silently matches nothing in sed — flavor differences, escaping layers, and leftmost-longest versus leftmost-first.20mOpen

Precision Matching

Capture groups, backreferences, lookarounds, flags, and Unicode — extracting exactly what you meant and nothing else.

  1. 01Capture Groups, Backreferences, and ReplacementNumbered and named groups, non-capturing groups, the last-iteration trap, and the replacement syntax that differs in every tool.22mOpen
  2. 02Lookarounds: Matching on Context Without Consuming ItLookahead and lookbehind as zero-width assertions, engine support differences, and when a lookaround is cleverness you should replace with code.20mOpen
  3. 03Flags, Lines, and Unicode: Where Correct Patterns Go WrongMultiline and dotall semantics, the trailing-newline validation bypass, CRLF, code units versus code points, and the stateful g flag.22mOpen

Production Text Processing

Catastrophic backtracking, the Unix text toolkit, and the judgment call of when to stop using regex at all.

  1. 01Catastrophic Backtracking and ReDoSThe pattern shapes that turn a regex into a denial-of-service, the real outages they caused, and the fixes in order of preference.25mOpen
  2. 02The Unix Text Toolkit: grep, sed, awk, and jqEach tool's lane, the flags you'll actually use, and the incident-response pipelines that answer questions in seconds instead of scripts.28mOpen
  3. 03Knowing When Not to Use RegexThe formats regex can't parse, the security bugs that come from trying, and a decision checklist for regex versus parser versus pipeline.20mOpen