python-regex-search

Question: What data structures and algorithms can be used for storing and filtering by pattern (or regex) a set of strings? Write the code using Java 8 functions and Stream API.

Answer:

We can use data structures like list and the library re of python for the regular expression. https://docs.python.org/3/library/re.html

We can use DataFrame from Pandas library for large structured data like an spreadsheet or like SQL. https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html