Beyond Compare - ignore certain text strings?

后端 未结 2 1297
孤街浪徒
孤街浪徒 2021-01-05 04:42

Is there a way to specify to ignore specific text? For example I have web files that are often the same execpt for the difference in file paths - local vs. remote paths. So

2条回答
  •  天命终不由人
    2021-01-05 05:25

    If you want to ignore something that can't be handled by a replacement 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. Uncheck the element in the Grammer elements list to make it unimportant.
    10. Click OK

    Your grammer should now be marked as unimportant (blue text)

提交回复
热议问题