Tag: Check if Any Element in List Matches Regex in Python
Check if Any Element in List Matches Regex in Python
This tutorial will discuss about a unique way to check if any element in list matches regex in Python. We can use the Python’s regex module, to check if any element in the list of strings, matches a regex pattern or not. Suppose we have a list of strings, Advertisements listObj = [“sample”, “is”, “text”, …
Check if Any Element in List Matches Regex in PythonRead More