Home >  Products >  Compare It! 3 >  Online Help
Welcome to Compare It!
About Compare It!
Installing and Removing Compare It!
What's New in This release?
Quick Start
User Interface Basics
Application Window Illustration
Using Compare It!
Comparing files
Merging Files
Editing Files
Setting Options
File Filters
Advanced Comparison
Printing and Reporting
Print options
Print Options: Margins
Print Options: Advanced
Comparison report
Comparison statistics
Keyboard Shortcuts, Toolbar Buttons, Menu Commands
Advanced Functions
Adding Shortcuts to External Applications
Adaptive comparison
Auto Backup
Automatch rules
Command Line Usage
Configuration File
Changes Only Mode
Custom Syntax Files
Defining Column Ranges
Enhanced Open File
File lists support
Folders comparison
Ignore Difference
Manual Matching
Merged Report
Moved Sections
Partial matching
Result File Support
Unicode Support
Using Compare It! with File Manager
Using fixed/alternative font
Using Regular Expressions
Using RegExps substrings
Word files comparison
Excel files comparison
Other file formats support
Zip File Support
General Information
What is Shareware?
How To Register
Warranty and License
Future Releases
Other Products
Frequently Asked Questions
Updates and Support
How to use automatch rule

This feature will be useful if you need to align lines which are not same, but have some common key value. If you have used ManualMatch command before, you will easily understand it - Automatch does the same, but (guess what?) automatically.

How to use Automatch?

  • Open Options > Comparison page. Select RegExp Editor.
  • Specify an ordinary RegExp rule to extract key substring
  • Make sure to specify AutoMatch rule in actions list
  • Compare It! will now apply newly created rule for all (or specified) file types.

How does it work?

Of course, you will hardly need this feature if you work with regular text files. AutoMatch can be invaluable for users working with log files of all kinds.

Consider these sample log files, each including 2 fields - key and value. Direct comparison with Compare It! does not give us a lot of information:

1BET31504 18777363 1BET31504 18777363
2BET31505    22022432BET31604    20408402
3BET31512    204423423BET31605    239734098
4BET31590    10252254BET31655    234603354
5BET31604    103013235BET32112    2003351
6BET31605    140741226BET35004    26933456
7BET31637    227124127BET40104    23113562
8BET31690    102556728BET41204    2463335471
9BET32004    52663569BET60505    30461244
10BET32037 40672534 
11BET32112 199323523 
12BET32547 4562235 
13BET60505 304623523 


Let's press F4 to invoke Partial Matching, now result is a bit better, but still the problem is obvious - application does not know anything about text structure, so it simply tries to match longer text. In some cases this would be enough (check lines #6, #13 in left file):

1BET31504 18777363 1BET31504 18777363
2BET31505 2202243 
3BET31512    204423422BET31604    20408402
4BET31590 1025225 
5BET31604 10301323 
6BET31605 140741223BET31605 239734098
7BET31637    227124124BET31655    234603354
8BET31690    102556725BET32112    2003351
9BET32004 52663566BET35004 26933456
10BET32037    406725347BET40104    23113562
11BET32112    1993235238BET41204    2463335471
12BET32547 4562235 
13BET60505 3046235239BET60505 30461244


So, let's tell Compare It! what is important for us in these files. We create a regExp with R1=^\w*, which matches first word of each line. Set action to AutoMatch rule, and see what we have after rescan:

1BET31504 18777363 1BET31504 18777363
2BET31505 2202243 
3BET31512 20442342 
4BET31590 1025225 
5BET31604 103013232BET31604 20408402
6BET31605 140741223BET31605 239734098
7BET31637    227124124BET31655    234603354
8BET31690 10255672 
9BET32004 5266356 
10BET32037 40672534 
11BET32112 1993235235BET32112 2003351
12BET32547    45622356BET35004    26933456
 7BET40104 23113562
 8BET41204 2463335471
13BET60505 3046235239BET60505 30461244

Using Automatch with "Never align" option

Situation when Automatch rule is used along with "Never align mismatches" option, is handled in special way - only rule-matched lines are aligned to each other, all other differences are separated.

© 1996-2009, Grig Software, All Rights Reserved
Browser Based Help. Published by chm2web software.