Build a Tiny Regex Engine

hard
Unit 24 · Validation0/1 to milestone

Implement fullmatch(pattern, text) returning True if the whole text matches a pattern built from:

  • literal characters
  • . (any single character)
  • \ followed by any character (that character literally, so \. matches a dot)
  • quantifiers applying to the preceding atom: * (zero or more), + (one or more) and ? (zero or one)
Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Build a Tiny Regex Engine · TechGradify