Project

Regex Engine (Python)

Hard
759 completions
~ 17 hours
4.1

Learn about the syntax of regular expressions, practice working with the string type, parsing, and slicing, and get more familiar with boolean algebra and recursion.

Provided by

JetBrains Academy JetBrains Academy

About

Regular expressions are a fundamental part of computer science and natural language processing. In this project, you will write an extendable regex engine that can handle basic regex syntax, including literals (a, b, c, etc.), wild-cards (.), and metacharacters (?, *, +, ^, $).

Training project icon

Training project

This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Extend your engine to compare two equal length strings using recursion.
Add the ability to compare a regex to strings that vary in length.
Extend the engine to handle the operators ^ and $ that control the position of the regex within a string.
Support the additional operators ?, *, and + that control the repetition of a character within a string.
Finally, implement the backslash \ as an escape symbol that allows to use metacharacters as literals.

Reviews

Guillaume Konen avatar
Guillaume Konen
4 months ago
Very challenging project, I was not used to recursion and it was a good training. The test cover a lot of special cases so I need to be very precise. The site give us good explanation for the good direction so i did not feel lost. This project really pushed me beyond my limits and it is exactly why ...
Tomas Kanuch avatar
Tomas Kanuch
4 months ago
This was complicated project. I have learned about slicing strings and conditional statements.
Christopher Morgan Brenes avatar
Christopher Morgan Brenes
4 months ago
I learned about Regular Expressions and how to write them. I know I'm missing information on the topic like when people write [a-z] or similar expressions but I feel like I can now approach the topic better than if I was trying to learn from zero. I learned about recursive functions which I enjoyed. ...

4.1

Learners who completed this project within the Python Developer course rated it as follows:
Usefulness
4.3
Fun
3.9
Clarity
4.1