replacments: comparing empty line to something

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drscripps
    New User
    • Oct 2008
    • 2

    replacments: comparing empty line to something

    Hi,

    I have 2 files that differ by one extra line.

    File #1:

    text1
    text2

    and

    File #2:

    text1
    extra
    text2

    When I compare the 2 files "extra" in File #2 isn't aligned with anything in File #1.

    How can I tell BC3 to effectively ignore "extra" if it is all by itself on a line. I looked at replacements but I can't replace "extra" with an empty line.

    Thanks for any tips.
  • Michael Bulgrien
    Carpal Tunnel
    • Oct 2007
    • 1772

    #2
    Right-click on toolbar, click Customize Commands...
    Choose Toggles from the "Display filter presets" dropdown
    Disable the "Orphan" toggles on the toolbar
    (two buttons: one with a red box on the left and one with a red box on the right)
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment

    • Michael Bulgrien
      Carpal Tunnel
      • Oct 2007
      • 1772

      #3
      P.S. Ensure that the "Show Context" toggle is disabled
      BC v4.0.7 build 19761
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Comment

      • drscripps
        New User
        • Oct 2008
        • 2

        #4
        ignore specific orphans

        Hi Michael,

        Thanks for the tip.

        But, that ignores all orphans. I actually only want to ignore specific orphans (i.e., information I know is irrelevant in the log files I'm comparing).

        Also, while the viewer hides the orphan lines the file comparison still reports differences.

        Thanks.

        Comment

        • chrisjj
          Carpal Tunnel
          • Apr 2008
          • 2537

          #5
          ISTM one uses Session Settings... | Importance, though I have myself worked out how to set the rules for just the current session.

          Comment

          • Michael Bulgrien
            Carpal Tunnel
            • Oct 2007
            • 1772

            #6
            Originally posted by drscripps
            How can I tell BC3 to effectively ignore "extra" if it is all by itself on a line.
            Create a new grammar element. Call it "Extra" if you like. Define it as a basic regular expression with ^extra$ in the text matching field. Make it case insensitive if you wish. Uncheck the importance checkbox for the new grammar element in your Importance tab under Session Settings.
            BC v4.0.7 build 19761
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

            Comment

            Working...