How to ignore non-trival differences in files with Beyond Compare

If you want to ignore something that can't be handled by a replacements because the to-state isn't easily defined such as mismatching page numbers you need to use a regular expression grammer to ignore certain strings.
In my case I needed to ignore Page numbers in a document footer
Here is how to do it:
  1. Load your comparison in Beyond Compare
  2. Click the Rules toolbar button (referee icon).
  3. On the Importance tab, click Edit Grammar.
  4. Click New.
  5. In Text matching enter your regex e.g. "Page\s\d{1,3}\sof\s\d{1,3}"
  6. Tick Regular Expression
  7. Click OK.
  8. Click OK.
  9. Un-check the element in the Grammar elements list to make it unimportant.
  10. Click OK
Your grammar should now be marked as unimportant (blue text)

No comments:

Post a Comment