Course
Regex & Text Processing
Regular expressions as a professional tool — how backtracking engines execute your patterns, how to write and test them against a real corpus, the Unix pipeline and grok/JSON for production logs, and the judgment call of when a regex is the wrong tool entirely.
Keep reading
Related articles from the SudoSecurity blog.
Java Pulled Primitive Patterns After Five Previews. JDK 28 Won't Compile Them.
Primitive types in patterns, instanceof, and switch previewed in every JDK from 23 to 27. On November 9 the Amber team withdrew the feature, and it won't be in JDK 28 even with --enable-preview. Here's why Valhalla changed the plan, what replaces it, and how to rewrite code that used it.
.NET 11 Is Out. Union Types Got the Applause, but unsafe Is What Changed.
.NET 11 shipped on November 10, 2026, and C# 15 finally has union types, the feature people have asked for since pattern matching arrived.
PHP 8.6 Finally Turns On the Session Settings You Were Told to Set in 2006
Every PHP hardening guide for two decades has told you to flip the same three session settings. PHP 8.6, due November 19, 2026, flips them for you: strict mode on, HttpOnly on, SameSite set to Lax.
Rust 1.100: The Never Type Is Finally Stable, and Cargo Learned to Wait
Rust 1.100 stabilizes the never type after ten years and five failed attempts, along with the core Allocator API and a DropGuard helper. The change most teams will notice is in Cargo: a one-line config that makes it skip any crate version published in the last few days.
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.
- 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
- 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
- 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
- 04Writing a Pattern You Can Prove WorksA mechanical pipeline for shipping a regex: spec sentence first, corpus of positives/negatives/near-misses second, pattern last, timing asserted in CI.18mOpen
Precision Matching
Capture groups, backreferences, lookarounds, flags, and Unicode — extracting exactly what you meant and nothing else.
- 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
- 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
- 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
- 04Replace with a Function: Computed ReplacementsWhen the replacement depends on the match — String.replace callbacks, re.sub callables, lookup tables, and the cliff edge where a callback becomes a tokenizer.18mOpen
Production Text Processing
Catastrophic backtracking, the Unix text toolkit, and the judgment call of when to stop using regex at all.
- 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
- 02Matching Across Lines: Records That Aren't LinesWhen records span lines: awk paragraph mode, slurp flags, rg -U, the m-versus-s distinction, and the bounded-lazy idiom for folded text.20mOpen
- 03The 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
- 04Grok, dissect, and the Case for JSON LogsNamed regex patterns in Logstash, Datadog, and Loki; dissect for fixed shapes; and why emitting JSON from the app beats maintaining grok rules.20mOpen
- 05Knowing 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