R

ReflexKR

Reflex Docs

Regular expressions you can see

·

Course overview

1

The missing payment: finding text as it is

2

The hit-and-run car: character classes

3

The torn phone book: quantifiers

4

The fake sign-ups: anchors and validation

5

Dates all over the place: groups and alternation

6

The 3 a.m. login: named groups and Match objects

7

The night before the story: substitution and splitting

8

The Backtracker's challenge: greedy, lazy and possessive

9

The safe's rules: lookaround

10

Same modus operandi: backreferences and conditionals

11

The unreadable regex: flags and compiling

12

Unmasking the Backtracker: review and a tokenizer

Regular expressions you can see

Course overview

Euljiro, Seoul: an alley of old print shops where everything smells faintly of ink. On the fourth floor of a tired building, gold leaf on a glass door reads Grep & Co. Data Detective Agency. Today is your first day on the job.

In this 10-hour course you join the agency as its newest detective and crack 12 cases, one at a time, picking up every single piece of the syntax in Python's re module along the way. The syntax you will use every day comes back case after case until it sticks in your fingers; even the rarely used corners each get a case of their own.

The people at the agency

WhoWhat they do
Director Han ByeolA former server admin with 30 years behind her, and the head of the agency. She types on a battered mechanical keyboard and likes to say, "Evidence leaves a pattern." Every lesson she hands you a case file, and at the end she leaves you a page of her notebook.
DotThe agency's black cat, with a single white spot on her forehead. She climbs onto anything, except she can never get past the window. You'll find out why in Lesson 1.
Detective KangA police detective from the local precinct. He knocks on the agency door whenever a case gives him a headache.
Ms. JeongRuns the online store "Market Jeong".
Reporter OhA journalist chasing a story.

And then there is a hacker nobody has ever seen: the Backtracker. He first shows himself in Lesson 8.

How a lesson works

  1. You receive a case file: the case number, the client, the evidence, and what it takes to close the case.
  2. You investigate with the director, learning the syntax you need to crack the case one piece at a time.
  3. You write patterns yourself in the Evidence lab. The lab isn't a picture of a regex engine; it runs on real Python re.
  4. When every condition passes, the case gets its Case closed stamp, and the director's notebook gains a line for each thing you learned in that lesson.
PartLessonsStory
Part 11–4Neighborhood cases to warm up: a payment record, a number plate, a phone book, fake members.
Part 25–7You chase a customer-list leak at the online store "Market Jeong".
Part 38–12The Backtracker throws down the gauntlet, and the battle of wits begins.

What you need

  • Basic Python (strings, functions, lists, for loops)
  • Python 3.14. Every example in this course was run and checked on 3.14. Syntax that changed after 3.11 is marked in the text.
  • Nothing to install. The Evidence lab runs right on this page. If you'd like to type along, start a python interactive shell and begin with import re.

Dot's tip

Go ahead, throw any pattern you like into the Evidence lab. If one takes too long, it gets cut off after 0.3 seconds. Why we need that safety switch? You'll find out in Lesson 8.

Next →

Lesson 1 · The missing payment: finding text as it is

Get news about new lessons

We'll email you when this course gets new lessons or a follow-up course opens.

We collect: your email address · Purpose: news about new lessons or the launch of this course · Kept until: you ask us to remove it. We never use it for anything else or share it. Reply to any notice email and we'll delete it right away.

Questions & answers

Ask anything about this lesson. Questions from every language version of this page appear together.

Shown as plain text, without links or formatting.

R

ReflexKR

Learn Python and Reflex by doing. Every example was run and verified on Reflex 0.10.0.

ReflexKR is free, with no banner ads. If it helped you, you can support it with a coffee. ☕ Buy us a coffee

Affiliate disclosure
한국어English日本語简体中文EspañolDeutsch

© 2026 ReflexKR · Since 2026 · CC BY-NC 4.0

Built with Reflex