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

Re: [Clip] complex search and replace

Expand Messages
  • Jody
    Hi Jorge, ... You could try something like this: ^!Document Last ... ^!Find StartPoint S ^!IfError NextDoc ^!Jump Select_Start ^!Set
    Message 1 of 3 , Aug 4, 2000
    View Source
    • 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 2 of 3 , Aug 4, 2000
      View Source
      • 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.