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

Reply
 
Thread Tools Display Modes
  #1  
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:
TCHAR* myString; // UNICODE_CONVERSION

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
  #2  
Old 03-Mar-2009, 04:22 PM
Aaron Aaron is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 6,795
Default

Hello,

.*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.
http://www.scootersoftware.com/download.php
Text Replacements is a Pro feature.
__________________
Aaron P Scooter Software
Reply With Quote
Reply

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 10:52 PM.


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