Arjay,
With the original examples Michael provided, I created pairs of text files, renamed them to your original examples (alpha123.txt) and they worked fine, verifying Michael's suggestion.
Please also note that Michael Bulgrien is not a Scooter Software employee. He is a fellow customer who is posting in this thread with suggestions for you to try.
With the updated example of "[email protected], Aaron@beyond compare email.com, Compare files with partially matching file names.eml" I created a pair of files that match those names, and used Beyond Compare to find the cursor position in the filename (displayed in the bottom Text Compare status bar) to determine where the truncation is taking place. I then put the suggested Alignment Override into the Misc tab of the Session Settings and it also aligned the file examples without issues.
The reason for the extra .* after the initial match is the regular expression must "match" on the entire left side. So the definition of:
.*\.eml would match on the left file. In order to 'find' the truncated beginning, the part we want to align by for the second file, we split it up into two parts:
(.{95})
followed by
.*
This allows us to pick out the Right File's name, and continue matching on the entire Left File Name.
The (parentheses) allow us to reference the text found on the left again on the right. Since the truncated version in your example was 95 characters long (before the .eml), matching on the first 95 characters, followed by a .eml works. The regular expression for the right side looks like: $1 (matching the first 95), followed by .eml. $1.eml. You then need to enable/check the Regular Expression checkbox when defining the Alignment Override (or editing it).
This way, the Left expression matches the File Name that would be found on the left, and aligns it with the File Name you expect on the right.
Michael's suggestion relies on the logic that your truncation happens at a specific character count (7 characters based on your first example, 95 on your second). I tried counting the number of characters in your screenshot, and they appear to be more than 95. Is the truncation count a variable number?
If you are still having trouble, I would suggest emailing us at [email protected] with:
1) Your Support.zip (from the Help menu -> Support; Export)
2) A link back to this forum post for reference
3) Two Snapshot files generated from the Tools menu -> Save Snapshot. One for each side of the comparison.
A Snapshot is a virtual directory that can be loaded in Beyond Compare and contains all of your file names, but not the directories. With this information we would have a complete comparison and could test a few different Alignment Override regular expressions to see what trouble you are running into and why it isn't working for you.
With the original examples Michael provided, I created pairs of text files, renamed them to your original examples (alpha123.txt) and they worked fine, verifying Michael's suggestion.
Please also note that Michael Bulgrien is not a Scooter Software employee. He is a fellow customer who is posting in this thread with suggestions for you to try.
With the updated example of "[email protected], Aaron@beyond compare email.com, Compare files with partially matching file names.eml" I created a pair of files that match those names, and used Beyond Compare to find the cursor position in the filename (displayed in the bottom Text Compare status bar) to determine where the truncation is taking place. I then put the suggested Alignment Override into the Misc tab of the Session Settings and it also aligned the file examples without issues.
The reason for the extra .* after the initial match is the regular expression must "match" on the entire left side. So the definition of:
.*\.eml would match on the left file. In order to 'find' the truncated beginning, the part we want to align by for the second file, we split it up into two parts:
(.{95})
followed by
.*
This allows us to pick out the Right File's name, and continue matching on the entire Left File Name.
The (parentheses) allow us to reference the text found on the left again on the right. Since the truncated version in your example was 95 characters long (before the .eml), matching on the first 95 characters, followed by a .eml works. The regular expression for the right side looks like: $1 (matching the first 95), followed by .eml. $1.eml. You then need to enable/check the Regular Expression checkbox when defining the Alignment Override (or editing it).
This way, the Left expression matches the File Name that would be found on the left, and aligns it with the File Name you expect on the right.
Michael's suggestion relies on the logic that your truncation happens at a specific character count (7 characters based on your first example, 95 on your second). I tried counting the number of characters in your screenshot, and they appear to be more than 95. Is the truncation count a variable number?
If you are still having trouble, I would suggest emailing us at [email protected] with:
1) Your Support.zip (from the Help menu -> Support; Export)
2) A link back to this forum post for reference
3) Two Snapshot files generated from the Tools menu -> Save Snapshot. One for each side of the comparison.
A Snapshot is a virtual directory that can be loaded in Beyond Compare and contains all of your file names, but not the directories. With this information we would have a complete comparison and could test a few different Alignment Override regular expressions to see what trouble you are running into and why it isn't working for you.
Comment