Feature #9: File Search

Implementing the "File Search" feature for our "Operating System" project.

Description

In this feature, we will make a search files functionality using regular expressions. We will be provided with a list of files and a regular expression. We will have to implement regular expression matching and return all the file names that will match the regular expression. The feature must include support for . and * characters where:

  • . can match any single character. ​​​​
  • * can match zero or more of the preceding characters.

The matching should cover the input string entirely (not partially).

Let’s look at a few examples:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.