Resource · Guide or article
Regular Expression Matching
Poses the regex matching problem with only . and * supported, where the pattern must match the whole input string. The page sets the task and stops there.
Reviewed
Open the original: Regular Expression Matching (opens the original site in a new tab)Practice this topicOpens the practice interviewer in Technical / coding mode; choose a question there.
Add to a roadmap
Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.
Source content: English
Given an input string s and a pattern p, implement regular expression matching with support for . and *. The matching should cover the entire input string (not partial). Explanation: a does not match the entire string aa.
PrepKit overview
PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.
- Suited to
- The source does not state a level
- Format
- Question list
What it covers
- Defines the two operators and the lowercase-only input constraints
- Explains four input and pattern pairs, including c*a*b matching aab with zero repetitions of c
How to use it
PrepKit study advice, not a claim made by the source.
Treat it as an exercise: write a DP table for s and p, and pass all four examples before opening the linked video. Then add your own tests for empty strings.
Scope and limitations
The problem statement is all you get. There is no solution approach or complexity, so you need the YouTube and LeetCode references or your own work.
Access and format
Problem README on GitHub, trekhleb/javascript-algorithms (MIT). English, free.
Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88
Evidence behind this overview
- src/algorithms/string/regular-expression-matching/README.md
Pages that include this
Get the PrepKit newsletter
Optional. You don't need it to use PrepKit.