Skip to main content
Loading page…
Python Mastery
Chapter 11
Lesson 3 of 4
Real Text Processing
Contents
Notes
Tutor
Note
Bridge: Regex Helpers Are Still re
Loading activity…
Previous
1 / 10
Continue
Contents
Notes
Discussion
Tutor
34 min
10 activities
0 of 10 done
In this lesson
1
Bridge: Regex Helpers Are Still re
2
When to Use Regex vs str Methods vs a Parser
3
Parsing Apache Access Logs
4
sub() With a Callable: Template Engine
5
Never Parse HTML With Regex
6
Extract Structured Data From a CSV-Like Log
7
Slugify: str Methods vs Regex
8
Choosing the Right Tool
9
Diagnose This Regex Bug
10
Order the Text-Processing Steps
Objectives
Learner can extract structured data (dates, emails, log fields) from real-world messy text
Learner can use re.sub with a callable to perform dynamic replacement
Learner can choose correctly between str methods and regex based on task complexity
Learner can explain when NOT to use regex (HTML, JSON, CSV) and which library to use instead
Chapter 11 · Regular Expressions & Text Processing
Regex Foundations
Advanced Regex
Real Text Processing
Unicode, Bytes & Encoding
Previous: Advanced Regex
Next: Unicode, Bytes & Encoding