Go Back   Scooter Forums > Beyond Compare 2 Discussion > Beyond Help
Register FAQ Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 03-Mar-2009, 01:57 PM
purdueucompe purdueucompe is offline
New User
Join Date: Mar 2009
Posts: 1
Question Ignore line if one file contains certain text

Is it possible for me to set up a regular expression to ignore an entire line when certain text exists in one of the files? For instance,

File1, line X:
char* myString;

File2, line X:

Clearly the lines differ, but I want to ignore this line because it is marked as UNICODE_CONVERSION. Adding unimportant text of ".*UNICODE_CONVERSION.*" doesn't seem to be working. Any suggestions?
Reply With Quote
Old 03-Mar-2009, 04:22 PM
Aaron Aaron is offline
Team Scooter
Join Date: Oct 2007
Location: Madison, WI
Posts: 7,332


.*UNICODE_CONVERSION.* should mark that entire line of file2 as Unimportant (Blue) text, which can then be ignored by toggling on Ignore Unimportant Differences. The line in file1 will still be an Important difference, however. You would need to define the line in file1 as unimportant text as well, but then it will not so differences if aligned to something different; you will have to look at the other pane.

Beyond Compare 3 includes a new feature called Text Replacements, which allows you to define the Left side as "char* myString;" as equivalent to the right side as "TCHAR* myString; // UNICODE_CONVERSION". They will then only be equal if the left and right side match in that specific way.

You can install the BC3 trial without uninstalling BC2. By default, they install to separate directories and can be used on the same computer.
Text Replacements is a Pro feature.
Aaron P Scooter Software
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -6. The time now is 02:57 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.