View Full Version : replacments: comparing empty line to something
drscripps
21-Oct-2008, 07:45 AM
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
21-Oct-2008, 07:17 PM
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)
Michael Bulgrien
21-Oct-2008, 07:24 PM
P.S. Ensure that the "Show Context" toggle is disabled
drscripps
21-Oct-2008, 08:00 PM
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.
chrisjj
22-Oct-2008, 05:25 PM
ISTM one uses Session Settings... | Importance, though I have myself worked out how to set the rules for just the current session.
Michael Bulgrien
22-Oct-2008, 09:23 PM
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.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.