Loading ...
Sorry, an error occurred while loading the content.

complex search and replace

Expand Messages
  • Jorge Otero
    Hi, I have a request that I don t know if it s possible to accomplish. Note Tab Pro s search and replace capabilities are impressive (searching and replacing
    Message 1 of 3 , Aug 2, 2000
    • 0 Attachment
      Hi,

      I have a request that I don't know if it's possible to accomplish. Note Tab
      Pro's search and replace capabilities are impressive (searching and
      replacing in the disk being the most useful for me).

      However, there's been a number of situations where I needed to be able to
      replace "anything" (which could be several lines) between "this" and
      "that", in several documents. I know this can be done with a reg.
      expression if everything is on the same line.

      An utility that let you search and replace everything in between two given
      words, tags, characters, whatever, would be really useful! (especially if
      you can do it directly in the disk.)

      I hope my explanation is clear enough.

      Best regards,
      Jorge
      ---
      THE STORMY MONDAYS <stormy@...> Oviedo, Spain
      <http://www.stormy-mondays.com>
      Check out our CD "Rainy Days And Broken Hearts"
      Featuring very special guest Elliott Murphy!!!
    • Jody
      Hi Jorge, ... You could try something like this: ^!Document Last ... ^!Find StartPoint S ^!IfError NextDoc ^!Jump Select_Start ^!Set
      Message 2 of 3 , Aug 4, 2000
      • 0 Attachment
        Hi Jorge,

        > However, there's been a number of situations where I needed to
        > be able to replace "anything" (which could be several lines)
        > between "this" and "that", in several documents. I know this
        > can be done with a reg. expression if everything is on the same
        > line.

        You could try something like this:

        ^!Document Last
        :Loop
        ^!Find "StartPoint" S
        ^!IfError NextDoc
        ^!Jump Select_Start
        ^!Set %Start%=^$GetRow$:^$GetCol$
        ^!Find "EndPoint" S
        ^!IfError NextDoc
        ^!Jump Select_End
        ^!SelectTo ^%Start%
        ^!Info Do something with selection at this point.
        :NextDoc
        ^!If ^$GetDocIndex$ = 1 End
        ^!Document Prev
        ^!Goto Loop
      • Richard L Walker
        Somebody is going to have to put out a warning message for the late night clip programmers. Too much jolt cola, Twinkies and programming until 4 a.m. bad for
        Message 3 of 3 , Aug 4, 2000
        • 0 Attachment
          Somebody is going to have to put out a warning message for the late night
          clip programmers. Too much jolt cola, Twinkies and programming until 4 a.m.
          bad for your health. ha ha (Lots of activity this time of night.)

          "Richard L Walker"<rlwalker@...>
          Pensacola, FL 32504-7726 USA

          -----Original Message-----
          From: Jody [mailto:KJB1611@...]
          Sent: Saturday, August 05, 2000 12:05 AM
          To: ntb-clips@egroups.com
          Subject: Re: [Clip] complex search and replace


          Hi Jorge,

          > However, there's been a number of situations where I needed to
          > be able to replace "anything" (which could be several lines)
          > between "this" and "that", in several documents. I know this
          > can be done with a reg. expression if everything is on the same
          > line.

          You could try something like this:

          ^!Document Last
          :Loop
          ^!Find "StartPoint" S
          ^!IfError NextDoc
          ^!Jump Select_Start
          ^!Set %Start%=^$GetRow$:^$GetCol$
          ^!Find "EndPoint" S
          ^!IfError NextDoc
          ^!Jump Select_End
          ^!SelectTo ^%Start%
          ^!Info Do something with selection at this point.
          :NextDoc
          ^!If ^$GetDocIndex$ = 1 End
          ^!Document Prev
          ^!Goto Loop
        Your message has been successfully submitted and would be delivered to recipients shortly.