I have two files which contains following lines:
file1:
6.959999999: LOG_MOD_L0_RECEIVE_TXBRP_CONTROL(0,
0x0059005f,
0x0049006d,
0x00b9008b,
0x001
#!/usr/bin/env python3
import re
lines1=open("output1.txt","rt").read()
lines2=open("output2.txt","rt").read()
hits1 = re.findall(r'\(.*?\)', lines1, re.DOTALL)
hits2 = re.findall(r'\(.*?\)', lines2, re.DOTALL)
print('equal:', set(hits1).intersection(hits2))
print('diff: ', set(hits1).difference(hits2))
Prints out
equal: {'(0, \n 0x0059005f, \n 0x0049006d, \n 0x00b9008b, \n 0x001300b9)', '(1, \n 0x0059005m, \n 0x0049006d, \n 0x04b9008b, \n 0x001300b9)'}
diff: set()