13298 Replacing entire line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chrisjj
    Carpal Tunnel
    • Apr 2008
    • 2537

    13298 Replacing entire line

    I want to make a Replacement of an entire line with null so that the line is excluded from comparison. The dialog refuses the obvious way - OK is disabled. Is there some trick with the regexp that does this?
    Last edited by chrisjj; 19-Apr-2011, 07:54 PM.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16009

    #2
    No. Text Replacements currently do not support matching on null or an empty line. The only option is to define the line as Unimportant.
    Aaron P Scooter Software

    Comment

    • chrisjj
      Carpal Tunnel
      • Apr 2008
      • 2537

      #3
      Originally posted by Aaron
      No. Text Replacements currently do not support matching on null or an empty line.
      Thanks, but I don't want to match on null or empty. I want to replace by null or empty.

      Originally posted by Aaron
      The only option is to define the line as Unimportant.
      How may I do that from the Session Settings?
      Last edited by chrisjj; 19-Apr-2011, 07:51 PM.

      Comment

      • Michael Bulgrien
        Carpal Tunnel
        • Oct 2007
        • 1772

        #4
        Originally posted by chrisjj
        Thanks, but I don't want to match on
        null or empty. I want to replace by null or empty.
        Since, by design, replacements in BC3 define what one side should look like for the purpose of matching it to the other side, replacing by null or empty does equate to matching on null or empty.
        Last edited by Michael Bulgrien; 19-Apr-2011, 07:48 PM.
        BC v4.0.7 build 19761
        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

        Comment

        • chrisjj
          Carpal Tunnel
          • Apr 2008
          • 2537

          #5
          Originally posted by Michael Bulgrien
          Since, by design, replacements in BC3 define what one side should look like for the purpose of matching it to the other side, replacing by null or empty does equate to matching on null or empty.
          I took matching to refer to the matching operation within the Replacement rather than the comparison.

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16009

            #6
            Sorry for the confusion. I'll rephrase. Text Replacements does not support declaring the "Replace With" section as null or empty. There must be text defined for the "Text to find" to be "Replace(d) With".

            Defining a grammar as unimportant is a Session Setting. Defining the grammar itself is within the File Format. The guide to define unimportant text is found here:
            http://www.scootersoftware.com/suppo..._unimportantv3
            Aaron P Scooter Software

            Comment

            • chrisjj
              Carpal Tunnel
              • Apr 2008
              • 2537

              #7
              Originally posted by Aaron
              Sorry for the confusion. I'll rephrase. Text Replacements does not support declaring the "Replace With" section as null or empty.
              That's now clear - thanks.

              Originally posted by Aaron
              Defining a grammar as unimportant is a Session Setting. Defining the grammar itself is within the File Format.
              OK, I'll use that workaround. I hope you'll fix Replacements' refusal of empty. The proliferation of one-off grammars to workaround around Session Settings limitations is undesirable.

              Thanks again.

              Comment

              • KobusSmit
                New User
                • May 2011
                • 1

                #8
                Hi BC Team

                I have exactly the same need: "...make a Replacement of an entire line with null so that the line is excluded from comparison"

                Such an enhancement will speed up my code propagation tasks.

                BTW, thanks a lot for a great and valuable application!

                Regards
                Kobus Smit

                Comment

                Working...