Skip to main content
Loading page…
Python Mastery
Chapter 22
Lesson 1 of 5
Regular Expressions (re)
Contents
Notes
Tutor
Note
Regex in the Standard Library: Quick Reference
Loading activity…
Previous
1 / 7
Continue
Contents
Notes
Discussion
Tutor
28 min
7 activities
0 of 7 done
In this lesson
1
Regex in the Standard Library: Quick Reference
2
re.compile() and Flags — Performance & Readability
3
Quick Check: re.search vs re.match
4
Pitfall: Greedy vs Non-Greedy Matching
5
Practice: Extract All URLs from Text
6
Practice: Redact Credit Card Numbers
7
Pro Tip: Use regex101.com While Developing
Objectives
Learner can recall when and how to use re.compile() for performance in stdlib pipelines
Learner can apply compiled regex patterns to practical data-extraction tasks not covered in the dedicated regex module
Chapter 22 · The Standard Library Toolkit
Regular Expressions (re)
Dates & Times (datetime)
Logging Like a Pro
Config & Environment Variables
collections, math, random & more
Previous: Refactoring to Pythonic Code
Next: Dates & Times (datetime)