Replace if different

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mechanius
    New User
    • Jan 2013
    • 2

    Replace if different

    Hello,
    I am looking for a solution to substitute all differences in 2 files.

    For clarification an example:
    right | left
    abc1c | abc2c

    as a result I want:
    abc?c | abc?c

    Is it possible to make a substitution to do this?
    If right=1 and left=2 replace with ? ?

    Thanks.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello,

    Are you looking to remove the "1" and "2" and replace them with "?". We can do this the Text Compare's Search menu -> Replace dialog. We do not have a multi-side find, that only finds text when it matches and aligns on both sides; each side is searched independently, though you can search both at once with a RegEx that could find this text on either side.


    For other people that stumble across this post looking for Text Replacements help: You can also set up a Text Replacement in BC3 Pro. This would not change the text of the file, but would show this specific alignment of text as equal instead of different. You can define a Text Replacement rule in the Text Compare's Session menu -> Session Settings, Replacements tab.
    Aaron P Scooter Software

    Comment

    • Mechanius
      New User
      • Jan 2013
      • 2

      #3
      Thanks for your quick reply. But I need a solution to replace only if on right side 1 and on the left side 2 stands. Perhaps on right: 1 and at the same position on the left appears 1 I don't want a substitution. Is this possible?

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Unfortunately, not from the Find/Replace dialog. If you can alter the Display Filters to show only the lines of text you want to replace on, then you can replace on only the visible lines. This could mean showing only different lines, if the type of alignment is always a difference, or only equal lines if you use a Text Replacement to make the above equal, and all other alignments are counted as differences. Is there a set of Display Filters/Importance to show only the lines you wish to replace on?
        Aaron P Scooter Software

        Comment

        Working...