You finished the explorers track with comprehensions and sorted-plus-lambda as your main tools. This week those give way to text. A log line is just a string, but inside that string is every field you care about.
Is regex the replacement for comprehensions then? They felt like the main leverage tool last track.
Think of regex as your new comprehension for text. Where a comprehension says "give me all items matching this rule," regex says "give me all substrings matching this pattern." Both are pattern-matching tools. This week splits regex across three lessons so each idea gets room to breathe — search on Day 5, extract on Day 6, replace on Day 7.
So I don't need to memorize a giant regex syntax upfront?
No. You'll learn one function per day: re.search for "does this appear?", re.findall for "give me every match," and re.sub for "replace each match." By Friday you can parse a log line, pull every IP out of free-form text, and mask sensitive fields — all with three small tools.
split() and maxsplitre.searchre.findallre.subGoal: by Friday you can turn raw text into structured, filterable, redactable data.
7 lessons this week
You finished the explorers track with comprehensions and sorted-plus-lambda as your main tools. This week those give way to text. A log line is just a string, but inside that string is every field you care about.
Is regex the replacement for comprehensions then? They felt like the main leverage tool last track.
Think of regex as your new comprehension for text. Where a comprehension says "give me all items matching this rule," regex says "give me all substrings matching this pattern." Both are pattern-matching tools. This week splits regex across three lessons so each idea gets room to breathe — search on Day 5, extract on Day 6, replace on Day 7.
So I don't need to memorize a giant regex syntax upfront?
No. You'll learn one function per day: re.search for "does this appear?", re.findall for "give me every match," and re.sub for "replace each match." By Friday you can parse a log line, pull every IP out of free-form text, and mask sensitive fields — all with three small tools.
split() and maxsplitre.searchre.findallre.subGoal: by Friday you can turn raw text into structured, filterable, redactable data.