Regex Training Sessions
A 10-session curriculum taking you from absolute beginner to production-grade regex. Each session builds on the previous, with hands-on exercises, real infrastructure data, and immediate practical application.
Training Philosophy
-
Absolute basics first - No assumed knowledge
-
Hands-on practice - Type patterns, see results
-
Real data - Use infrastructure logs, configs, notes
-
Tool coverage - grep, sed, awk, vim, Python
-
Production focus - Performance, security, maintainability
Sessions
| Session | Focus | Duration | Status |
|---|---|---|---|
Absolute Basics - Literals, metacharacters, character classes |
30 min |
Ready |
|
Quantifiers & Flavors - BRE, ERE, PCRE differences |
60 min |
Ready |
|
Groups & Capturing - Extraction, backreferences, named groups |
45 min |
Ready |
|
Lookahead & Lookbehind - Context-aware matching, |
45 min |
Ready |
|
sed Mastery - Stream editing, substitutions, transformations |
60 min |
Ready |
|
awk Regex Power - Field extraction, pattern-action processing |
60 min |
Ready |
|
vim Regex - Search, substitute, global command, case conversion |
45 min |
Ready |
|
Python re Module - Automation, parsing, named groups |
60 min |
Ready |
|
Advanced Patterns - Multi-line, nested, recursive, edge cases |
75 min |
Ready |
|
Performance & Optimization - ReDoS, backtracking, production patterns |
60 min |
Ready |
Total curriculum time: ~9 hours
Guides
| Guide | Purpose |
|---|---|
Stop reading, start typing. Structured grep/sed/awk exercises. |
|
Professional (ISE, network, security) AND personal (notes, finances, journals) patterns. |
|
Test your skills with progressive difficulty exercises. |
|
Avoid the traps that catch everyone. |
Curriculum Structure
Phase 1: Fundamentals (Sessions 01-02)
Build the foundation. Understand metacharacters, character classes, quantifiers. Learn the difference between BRE, ERE, and PCRE.
Phase 2: Power Features (Sessions 03-04)
Master extraction with capture groups and context-aware matching with lookaround. These are the features that separate beginners from intermediate users.
Phase 3: Tool Mastery (Sessions 05-07)
Apply regex in the tools you use daily: sed for transformations, awk for field processing, vim for editing. Each tool has its quirks.
Phase 4: Automation (Sessions 08-10)
Move beyond one-liners to Python automation. Handle complex real-world patterns. Optimize for production performance and security.
Drills
Quick practice exercises for building muscle memory:
Tools
-
regexr.com - Interactive regex tester (recommended for learning)
-
regex101.com - Detailed explanation of patterns with PCRE/Python support
-
ripgrep (
rg) - Fast grep with PCRE2 support -
Python REPL -
import refor testing patterns
Quick Reference
| Concept | BRE/ERE | PCRE |
|---|---|---|
Literal matching |
|
Same |
Any character |
|
Same |
Character class |
|
Same |
Negated class |
|
Same |
Start/End anchor |
|
Same |
Word boundary |
|
|
Quantifiers |
|
Same + lazy |
Grouping |
|
|
Alternation |
|
|
Lookahead |
Not supported |
|
Lookbehind |
Not supported |
|
Named groups |
Not supported |
|
Progress Tracking
Each session document includes:
-
Pre-session setup and test data
-
Lessons with examples and exercises
-
Self-check solutions (collapsible)
-
Connection to practical work
After completing all 10 sessions, you’ll be able to:
-
Write patterns for any text extraction task
-
Choose the right tool (grep/sed/awk/vim/Python)
-
Avoid performance pitfalls
-
Build maintainable pattern libraries
-
Handle edge cases that break naive patterns
Training Agreement - Commit to deliberate practice.