I'm trying to remove instances of the following:
add $t1, $zero, 9
sw $t1, 8($t4)
Where 9 could be any number, however 8 is consistent. If I copy this expression in Vim I get: ^Iadd $t1, $zero, 9^M^Isw $t1, 8($t4)^M
Of course if I want to search and replace (I do) I need to escape the $. I've also tried replacing ^I with \t and ^M with \r, but can't seem to match this expression. I've tried:
%s/\tadd \$t1, \$zero, \d\r\tsw \$t1, 8(\$t4)//
%s/^Iadd \$t1, \$zero, 9^M^Isw \$t1, 8(\$t4)^M//
%s/\tadd $t1, $zero, 9\r\tsw $t1, 8($t4)//
but I can't seem to get anything to match. What am I missing here? Pretty much everything in assembly (MIPS) looks the same, so solving this problem would be quite useful