Replace specific string (below) in file in Python
I have a text file that is something like the following:
test al,al
jne 0x514 <asm4+23>
mov DWORD PTR [ebp-0x8],0x1
jmp 0x587 <asm4+138>
mov edx,DWORD PTR [ebp-0x8]
I need the result to be like this
test al,al
jne asm4+23
mov DWORD PTR [ebp-0x8],0x1
jmp asm4+138
mov edx,DWORD PTR [ebp-0x8]