Announcement

Collapse
No announcement yet.

13298 Replacing entire line

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

  • 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.

  • #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


    • #3
      Originally posted by Aaron View Post
      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 View Post
      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


      • #4
        Originally posted by chrisjj View Post
        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


        • #5
          Originally posted by Michael Bulgrien View Post
          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


          • #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


            • #7
              Originally posted by Aaron View Post
              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 View Post
              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


              • #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...
                X