Apr-24-2020, 02:34 PM
Try use
Don't need all those escape
re.search()
instead.Don't need all those escape
\
to match that line.try: output = subprocess.check_output("edac-util", shell=True) except subprocess.CalledProcessError as error: pass for line in output.decode().splitlines(): if re.search(r'mc1: 1257 Corrected Errors with no DIMM info', line): print ("match ok") else: print ("match ko")