OK So I have list of strings that I would to use as a regex search. e.g.
import re
regex_strings = ['test1','test2','test3']
#Obviously this won't work here as is!
regex = re.compile(regex_strings)
I also have another list of strings. e.g.
strgs = ['This is a test1','This is a test2','This is a test1','This is a test1','This is a test3']
I want to iterate over the 'strgs' list and regex check each string against the 'regex_strings' list. Then, if there's a match, return the entire string.
I've been scratching my head here for a bit and I'm not quite sure the best way to approach this. Any suggestions would be really appreciated!
Regards.