No announcement yet.

Ignore Differences in Syntax in Beyond Compare

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignore Differences in Syntax in Beyond Compare

    Please answer this question

    In a branch of code I have changed all of the code from obj.varname to obj("varname") and when I compare the code I would like to ignore these differences since varname is the same.

    I have a regular expression that I think I need but unfortunately can't get the comparison to be ignored using Beyond Compare from Scooter


    I am following this tutorial

    So my question: is this even possible with beyond compare? If yes, please share a solution including either instructions or post your screenshots.

  • #2

    Unimportance would require two definitions, and would mark both obj.varname and obj("varname") as unimportant wherever they appeared in the file (regardless of what they aligned to). The item they aligned to would still be Important/Unimportant depending on its own definition.

    Edit: Make two separate grammar entries with the same "New Element" name. I would suggest some custom name such as "Unimportant method name". Then in the Session Settings, Importance tab, make sure "Unimportant method name" is unchecked.

    The scenario you described is best met by our BC3 Pro feature Text Replacements. If you are registered for BC3 Std, you will need to revert to trial mode to try this out:
    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.

    Once done, load your two files in the Text Compare. Given your example, I loaded a file on the left with:

    and a file on the right with:

    Then go to the Session menu -> Session Settings, Replacements tab, and create a New text replacement.

    On the Left I used:

    and on the right I used:

    and I enabled "Regular expressions".
    Last edited by Aaron; 15-Aug-2012, 12:09 PM. Reason: Edit: remove "|"
    Aaron P Scooter Software