I want to match all lines in a test report, which contain words \'Not Ok\'. Example line of text :
\'Test result 1: Not Ok -31.08\'
I tried
Absolutely no need to use RegEx in this case! Just use:
s = 'Test result 1: Not Ok -31.08' if s.find('Not Ok') > 0 : print("Found!")
or as already mentioned:
if 'Not Ok' in s: print("Found!")