No announcement yet.

compare text to first = character

  • Time
  • Show
Clear All
new posts

  • compare text to first = character

    Hi there,

    I've been investigating the "Define Unimportant Text in Beyond Compare" but can't get it to do what I want...

    Basically I have two parameter files, structured as follows, both are UTF-8.

    key say: formname.key
    txt say : text

    The only difference is that property file 2 has the text encrypted.


    file 1 is form1.title=formTitle
    file 2 is form1.title=ENC(1231sdfsfgsghsrtw56wrasger54t)

    I want to compare only the first characters to the = sign which is not always at the same position (key lengths can be different)

    I've set up a new File Type "Properties File" and tried to define the correct Grammer under basic and Delimited to no effect.

    In Basic I've said regular expression /[^=]*/ which should get all characters to the = sign but it's not working.

    Basically I really want to ignore everything after the = sign...or include everything until the = sign...

    Can any one help?

    thanks and regards

  • #2

    For a RegEx that looks close. One I found seems to work that you could use:

    Or use the Delimited Grammar type and define a grammar to match on
    End of Line

    Once the grammar is defined, you can then use the Session Settings to control if the grammar is Important or Unimportant, and if "Everything Else" is Important or Unimportant. Checked items are important, unchecked are unimportant. You can then use the drop down to set these settings for This View Only, or Also update session defaults to apply these settings for future text comparisons.

    I'll also add the link to our KB article on the subject for any other users who find this forum post:
    Aaron P Scooter Software


    • #3
      Thanks for that,

      but the Regex still doesn't work,

      when unticked it shows everything to the right of the = as being different/equal and ignores the key (left of the =

      so 99% of the lines are shown as different.

      when ticked it still separates the data into lumps of different text with no alignment...

      The Delimited doesn't work as expected either...showing the same as above...

      When I use the All/Diffs/Same icons, they all say to me not quite working...(...or not to my expectations)

      PS - what's the colour in text compare for ignored? All I still get is red or blue...

      thanks and regards


      • #4

        Grammar definitions are not important or unimportant, but define a specific text block. It is then down to the Session Settings to control what is Important. To ignore everything after the = with the above RegEx, you would mark that RegEx as Important, then also make sure to uncheck "Everything Else" so all non-defined text is Unimportant.

        Important differences are Red
        Unimportant differences are Blue.

        Blue differences are still 'differences' (shown when using Show Differences, etc) until you also enable Ignore Unimportant Differences in the toolbar. This toggle, when enabled, will hide all blue text as black text, and treat it as if it were equal.

        The other (= to End of Line) is the opposite type of grammar. With this you would need to define it (and not the other), then mark it as Unimportant, while Everything Else is still important.

        If you are still having any trouble, please email a set of sample files, a screenshot, and your current from the Help menu -> Support; Export dialog to [email protected]
        If you email us, please also include a link back to this forum thread for our reference.
        Aaron P Scooter Software