I have a list, I want to compare each element of list against a list of regex and then print only what is not found with regex.Regex are coming from a config file:
exclude_reg_list= qa*,bar.*,qu*x
Code:
import re
read_config1 = open("config.ini", "r")
for line1 in read_config1:
if re.match("exclude_reg_list", line1):
exc_reg_list = re.split("= |,", line1)
l = exc_reg_list.pop(0)
for item in exc_reg_list:
print item
I am able to print the regexs one by one, but how to compare regexs against the list.