Caffeinated Coder
Book an appointment
Lesson S1 · Special topics

Regular expressions

A regular expression is a small pattern that describes text: a word, any digit, three letters in a row, something at the very end. Step through ten lines of Python and watch the re engine move a pointer along a string one character at a time, back up when a guess fails, and hand back what it found. Then see the one pattern shape that can take minutes to fail, and when plain string methods are the better tool.

12 min10 steps5 questionsIntermediate
Fig S1 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.