Announcement

Collapse
No announcement yet.

Ignore data order in a line compare

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignore data order in a line compare

    Hello, I am comparing 2 files, line by line. I'd like to be able to ignore order within a line. Is this possible. In this example, both of these lines are equivalent for my purpose but BC is flagging these as different. How can I ignore this. Thank you!

    File A, Line 1: apple, grape, orange
    File B, Line 1: orange, grape, apple

  • #2
    Hello,

    There is no way to automatically account for this kind of change. The order of the characters determines which character aligns to which character. You can enable the View menu -> Alignment details to see the bottom status bar represent how characters are pushed or pulled side to side to align to another character.

    You could define specific types of changes as Text Replacements, such as "apple" = "orange" in any instance where they are the aligned character patterns. This would require manual definition, so it would mean you already know the re-ordering pairings in order to define that kind of rule.

    Or you can define the whole pattern as Unimportant, to ignore that entire line (any line that begins with apple or orange, or some other logical pattern definition) so that 'lists' are then ignored fully. But the list could then contain any items; it would be unimportant even if orange aligned to a new entry like banana.
    Aaron P Scooter Software

    Comment


    • #3
      Oh, one other strategy: an external conversion which sorts the items. Then they would be in the same order. We have an example of that strategy with our different XML formats for download here, like XML Sorted.
      https://www.scootersoftware.com/down..._moreformatsv4

      This would (theoretically) alphabetize the items, so then they are in the same order. However, any edits/saves then made to the file would save in this new ordering.

      We have an example of defining custom command line conversions to files, using RESX as an example, here:
      https://www.scootersoftware.com/supp...rnalconversion
      Aaron P Scooter Software

      Comment


      • #4
        Ok thank you. I will look into that.

        Comment

        Working...
        X