Skip to main content
Loading page…
Python Mastery
Chapter 11
Lesson 2 of 4
Advanced Regex
Contents
Notes
Tutor
Note
Bridge: Reusing the re Module
Loading activity…
Previous
1 / 10
Continue
Contents
Notes
Discussion
Tutor
34 min
10 activities
0 of 10 done
In this lesson
1
Bridge: Reusing the re Module
2
Named Groups and Backreferences
3
Flags, re.compile, and VERBOSE Mode
4
Catastrophic Backtracking: The ReDoS Vulnerability
5
Named Groups in Action: Parsing Log Lines
6
Sub with a Function: Censor Profanity
7
VERBOSE Pattern: ISBN-13 Validator
8
What Does a Positive Lookbehind Assert?
9
Explain Non-Greedy Quantifiers
10
Categorize These Assertions
Objectives
Learner can use named groups with (?P<name>...) and reference them by name
Learner can write lookahead and lookbehind assertions
Learner can apply re.compile and flags (IGNORECASE, MULTILINE, DOTALL, VERBOSE) correctly
Learner can identify patterns that cause catastrophic backtracking and rewrite them
Chapter 11 · Regular Expressions & Text Processing
Regex Foundations
Advanced Regex
Real Text Processing
Unicode, Bytes & Encoding
Previous: Regex Foundations
Next: Real Text Processing