No announcement yet.

Ignore Timestamp does not work

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignore Timestamp does not work

    Both replacements are regexes and the directions are set right (I think)

    The simpler replacement (no regex) works fine which is also swhon on the screenshot :

    xml:lang="nl" lang="nl" => xml:lang="en" lang="en"

    Regards, Tom

  • #2
    The regexes are non greedy since the search function in BC finds them this way. I also tried to make them non greedy .*?


    • #3
      Hello Buckley,

      Your Text Replacement definitions would match if Content="something" aligned specifically to Content="". Since this example is Content="something" aligned to Content="something else", it does not match either of the Text Replacement definitions.

      You are probably looking for an Unimportant definition. We have a handy KB article on how to set those up available here:

      You can make a Basic element that matches on Content=".*"
      How would this work for your files?

      Let us know if you have any questions.
      Aaron P Scooter Software


      • #4
        Understood, it makes sense in retrospect.

        I thought that both files were first individually parsed by the regexes and then compared. If you take this interpretation they should match right?

        Good to know that I can try out unimportant definitions.

        Regards, Tom


        • #5
          Hello buckley,

          The intended use of Text Replacements is to handle text as unimportant in very specific situations. For example, on one side of your file you replace content="something" with content="blank". You can perform a Replace All text to replace all instances of "something" with "blank", and then create a Text Replacement rule that treats that comparison as equal. If content="something" aligns to "somethingElse" then that difference will still be found on both sides.

          With unimportant text, content="something" marked as unimportant will mark it as unimportant regardless of if it aligns to "somethingElse". But "somethingElse" will still be shown as an Important difference, unless it is also defined as Unimportant.

          Does that help provide some examples of how Unimportant definitions and Text Replacements can be used?
          Aaron P Scooter Software


          • #6
            I have trouble getting this to work, would you provide more detailed help on this? (winxp, 3.1.10 11626)

            If I have two one-line files:
            <style ss:id="onething">
            <style ss:id="another">

            In the session settings, I created a new grammar element, Basic Regex id="[^"]", and unchecked it (to indicate not-important). The text within the quotes still shows red instead of blue.

            How do I define replacements/grammar to make the text within quotes be treated as unimportant, so that the two lines can be filtered out using 'Ignore Unimportant Differences' ?


            • #7

              Does your Regex definition match the item inside the quotes? You can click your cursor into the quoted section (not highlight, but just click into it) and in the bottom status bar of each pane, it will mention the name of the Grammar item. If it says "Default text", then the grammar item definition does not match where the cursor has been placed.

              Instead of a RegEx, why not make the grammar type a Delimited rule of

              <style ss:id="
              Aaron P Scooter Software


              • #8
                Thanks Aaron. Putting the cursor on the text between the quotes shows "String" at the bottom. (This is using plugin Excel-to-XML, which has String, Comment, Operator grammar items). The text is always classified as "String" no matter where I move my new item within the grammar list.

                When I change to a Delimited grammar item, it all works as I expect.

                Thanks for the heads-up to check to status bar to see what grammar item is detected, and for the suggestion to use Delimited.