I am new to Python and have been trying to find all the strings which match multiple patterns. I did some google search and found some posts which suggest to compile all the patterns into one. However they were using the
grep -i "[0-9' '-:A-Za-z].* ERROR.*Job failed\|Caused by:\|^ *at\|ERROR\|more$" <file-name>
re.findall(combined_regex, your_string) is probably what you're looking for.
If you plan on doing this many times in the same program, consider compiling the regex as follows for better performance:
compiled = re.compile(combined_regex) results = compiled.findall(your_string)