Announcement  •  Saturday, Sep 24th 2022

Build your own grep

Today we're announcing our latest course, Build your own grep.

Build your own grep

grep is a CLI tool for searching through text using regular expressions.

What will you build?

The Build your own grep course will take you on a journey in creating your own version of grep from scratch.

Example grep commands

Your grep implementation will be capable of performing a wide variety of searches, matching the behavior expected by the official grep.

Some examples:

  • \d apple should match "1 apple", but not "1 orange".
  • \d\d\d apple should match "100 apples", but not "1 apple".
  • \d \w\w\ws should match "3 dogs" and "4 cats" but not "1 dog" (because the "s" is not present at the end).

You can see the full list of capabilities on the course page.

What will you learn?

At its core, grep is a regex parser & evaluator.

You'll learn how regex parsers work, while getting your hands dirty with language grammars and finite state automata.

Since you'll be learning through actual implementation, this will be an exercise in further mastering your favorite programming language. At this time, we support Rust and Python, and other languages are coming soon.

Get started

You can access the course at its dedicated page and start by picking a language. If your desired language isn't supported, let us know.

Got feedback? Please write us an email!

We can't wait to see you build your own grep.