Time to Use Regular Expressions More, Um, Regularly
summary
Argues that regex is the most powerful cross‑platform text tool, then shows exactly how it behaves in .NET/PowerShell: use -match and $matches for quick checks, [regex] cast or New-Object System.Text.RegularExpressions.Regex for control, and Select-String as the grep equivalent. Demonstrates engine details—greedy vs lazy, backtracking—and warns that .NET regex can spin into effectively infinite work so implement regex timeouts. Lists practical tools (regex101, RegexBuddy, Regex Workbench) and working examples: emails, SSNs, password checks, HTML extraction.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 3:55Goals
- 6:54Why regex
- 10:51Why regex is bad
- 12:31What is regex
- 18:07Using regex in PowerShell
- 22:18Wildcards
- 25:42regex row
- 27:52regex engine
- 28:06chunks
- 28:55engine scans
- 29:08how the engine matches
- 30:23Hotdiggity
- 32:43Leftmost
- 34:05Example
- 36:29Backtracking
- 40:56Wildcard
- 52:05Backtrack
related talks
48mThe Magic Of Regular Expressions
06mLightning Talk: Using Regular Expressions in Erlang
38mTotal ReDoS: the Dangers of Regex in JavaScript
26mTotal ReDoS: The Dangers of regex in JavaScript
43mTotal ReDoS: the dangers of regex in JavaScript
01h 01mBreaking Your Code in New and Exciting Ways
23mLinear Matching of JavaScript Regular Expressions
31mOh no! My regex is causing a Denial of Service! What can I do about it?
