The Magic Of Regular Expressions
summary
Brief, practical walkthrough of regular-expression gotchas that shows real code and fixes: a colleague’s email validator that devolves to returning true, a log4j snippet used as test data, and an IP regex that starts too permissive then gains digit-range logic to correctly match IPv4. Demonstrates greedy vs non‑greedy fixes for HTML-tag overmatching, lookahead/lookbehind for selective matches, and backtracking performance traps. Uses visual tools regex101 and regexper (train diagrams) and cites the monstrous 82-line email regex as a reason not to reinvent validation.
AI-written summary · about
chapters (15)
- 0:00Start
- 4:14The Vision
- 5:40The Reality
- 10:06Log4j Log File
- 21:13Recap: Quantifiers
- 22:07Recap: Grouping
- 25:05Recap: Lookaround
- 25:41Lookahead: Example
- 27:07Backreferences (contd.)
- 31:19Quantifiers Revisited
- 32:01Final Recap
- 35:07MOAR! EXAMPLES!
- 39:04The Email Regex Horror
- 41:16Your New Reality!
- 42:03Thank you!
related talks
01h 37mTime to Use Regular Expressions More, Um, Regularly
06mLightning Talk: Using Regular Expressions in Erlang
27mAn introduction to property based testing
49mCrash and test failure analysis with AI... no wait, ehm, with regexes!
01h 01mBreaking Your Code in New and Exciting Ways
55mTest to Break Principles
20mAutomatic Repair of Regular Expressions
51mAutomating to augment testing
