Regular Expressions for Beginners / Chapter 1 — First Steps with Regular Expressions (lessons 1–5) / Lesson 1
What a Regular Expression Is: Searching by Shape, Not by Text
Time needed: about 12 min (estimate)
Reading settings
These settings are remembered on this device only.
You can try the opening of this lesson without an account.
What you want is a shape, not fixed text
The subject of this course is the orders and logs of a small bakery, Komugi-do. Each order gets a number like KM-20261103-0042: KM-, eight digits for the date, -, and a four-digit serial for that day. When you want to pull every order number out of the intake notes, plain search gets stuck. Every number is different, so there is no single text to search for.
Tab indents. To leave the editor, press Esc, then Tab.
Create a free account to keep reading
With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.
Report a problem with this lesson
Log in to send a report.