My wish-list: in text compare, use replacement to remove text.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RodolfoGiovanninetti
    Veteran
    • Oct 2007
    • 336

    My wish-list: in text compare, use replacement to remove text.

    I am comparing two batch files.
    In one there are lines such as
    Code:
    echo hello
    .
    In the other one there are lines such as
    Code:
    echo hello >> log.txt
    .
    I understand that I can mark
    Code:
     >> log.txt
    as unimportant text.
    But, I believe that sometimes it might be useful to be able to replace a text with nothing on the other side.
    Right now, if I leave the "Replace with" field empty, the OK button is grey.
    Can You add this to the wish-list?


    Thank You and regards

    Rodolfo Giovanninetti
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Sure thing, Replace With nothing is something on our wishlist. In this specific example, however, would a definition like:

    (.*) >> log.txt
    with
    $1

    work? This would match on the longer side, and then disregard the >> log.txt. As long as your other instances can match by removing data, that there is no text in the Destination that isn't in the Source or can be explicitly defined, then this should work.
    Aaron P Scooter Software

    Comment

    • RodolfoGiovanninetti
      Veteran
      • Oct 2007
      • 336

      #3
      Maybe I did not understand Your instructions, but it seems that it does not work.
      I attach here a screen-shot with the example.

      Regards

      Rodolfo Giovanninetti
      Attached Files

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Hello,

        Did you enable "regular expression" as part of the definition?

        Otherwise
        (.*) >> log.txt
        to
        $1
        X Regular Expression

        seems to work for me. If you are still having trouble, would you be able to post or email sample files? If emailing [email protected], please include your BCSupport.zip and a link back to this forum thread for our reference.
        Aaron P Scooter Software

        Comment

        • RodolfoGiovanninetti
          Veteran
          • Oct 2007
          • 336

          #5
          You are right, I had not select regular expression.


          Thank You and regards

          Rodolfo Giovanninetti

          Comment

          Working...