I need a help,
list1 = [abc, xyz]
output:
123
143
153
abc!
abc
hhj
xyz--
xyz
I am using below code:
for line in ouput.split("\n"):
line = line.strip()
if (re.search(list1, line)):
print "abc and xyz present in output"
Above code does not work for my requirement
Note it should not macth for abc! and xyz-- meaning it must match only abc and xyz