PDA

View Full Version : ignore the line


22-Apr-2004, 11:44 AM
Does beyond compare support to ignore a line for comparision? Most revision control tools supports key word expansion. It would be nice if a comparison tool ignore this kind of line as it has nothing to do with the real content of the file. It will be perfect to support regular expression to specify the pattern.

Chris
22-Apr-2004, 02:10 PM
You can mark text matching a regular expression as unimportant.

Create a rule for the text you are comparing. Edit the rule and go to the Importance Tab. In the Unimportant Text section, add new unimportant text and make it a regular expression type.

30-Apr-2004, 06:28 AM
Great. Thank you for the help.

jimkress
02-May-2004, 01:51 PM
I want to ingnore a line that contains specific text, even if there are differences on that line. How would I do that with BC?

Chris
03-May-2004, 11:30 AM
If you create a rule (as described earlier in the topic) for the text to be unimportant, and select "Ignore Unimportant Differences" it should match between two files.

If there is a particular delimiter, like # or // at the start of the line, a delimiter should work well. If the text you're matching on is in the middle of the line, a regular expression may work better.

If you're having difficulty creating a rule for the file type, please send an example file to support and we can help you create one.

jimkress
03-May-2004, 01:28 PM
OK.

I tried the prior code but had no luck making it work.

I'll send the two files I want to compare.

Thanks.

jimkress
04-May-2004, 08:01 AM
Just to provide closure in the forum, Chris' suggested expression:

^.*SECONDS.*$

The ^ means beginning of the line,
.* means followed by any number of characters
$ means end of the line.

Works just fine.

Thanks guys!