ignore lines with specified difference only

52 Views Asked by At

I have created a new grammar element and set it as unimportant

ModuleName=Text matching .*Module(A|B).*

Below is my expectation. I want to ignore differences on module name only.

Unimportant difference
void ModuleA_writeData(uint8_t *data) vs void ModuleB_writeData(uint8_t *data) 

Important difference 
void ModuleA_writeData(uint8_t *data) vs void ModuleB_getData(uint8_t *data) 

However, my current setting will ignore both important and unimportant differences as shown above. How can I ignore the differences on module name only?

1

There are 1 best solutions below

0
Chris Kennedy On

Instead of using unimportant text, use a replacement (Beyond Compare 3 or 4, Pro only).

Beyond Compare 4 Pro:

  1. Load files in the Text Compare.
  2. Click the Rules toolbar button (referee icon).
  3. Go to the Replacements tab.
  4. Click +.
  5. Text to find: ModuleA_
  6. Replace with: ModuleB_
  7. Click OK until back to the main window.

If using Beyond Compare 3 Pro, in step 4 click New instead of +, otherwise steps are the same.

Replacements aren't supported in Beyond Compare 2 or older.