No announcement yet.

Grammer Item help with delimeted lines.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Grammer Item help with delimeted lines.

    Hello, I have just started using beyond compare. I am using it to compare a set of files in one folder to another. It is working well but I am trying to refine what is considered an un-important difference, using a grammer item. I can flag an entire line as unimportant, but would like to be able to focus on a specific data element in a specific line. For example, in the line below, I want to ignore any difference in the last data element (the date), but flag differences in any other data elements. How would I write my Grammer Item rule?



  • #2

    You would need to define a RegEx to match on the text you specifically want to ignore, for example:
    Aaron P Scooter Software


    • #3
      Thanks for the reply. However, I cannot predict what the text will be. I only know that it will be the in the ninth position of the line starting with "BAK", with each position delimited by "|". Can this line splitting and position targeting be coded in a Regex statement?


      • #4

        Not that I'm aware of. A RegEx might be able to find the 9th position of a line, but we wouldn't be able to limit this to only lines that begin with BAK. The only workaround I can think of would be to define something like:
        to match on the first 8 cells if the line begins with BAK, then make another
        to match on a line that does not begin with BAK
        Then make these two grammars important, and mark "Everything Else" as Unimportant.

        If you have | delimited data, it might also be easier to sort it in our Data Compare, where we can mark the 8th Column as Unimportant (in all cases, regardless of Bak), just by right clicking the column header, and changing from Standard to Unimportant.
        Aaron P Scooter Software