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

Re: [NTO] Need Reg Exp

Expand Messages
  • Jody
    Hi Mike, ... You can also do it with ^!Toolbar Join Lines instead of the ^!Replace below. Clips are normally much faster than RegExp, even though they take
    Message 1 of 5 , Jun 1 6:50 PM
    • 0 Attachment
      Hi Mike,

      >The first line of each paragraph of straight text has three
      >spaces of indentation.
      >
      >How can I remove the EOL characters which are NOT followed by
      >three spaces without removing the rest?

      You can also do it with ^!Toolbar Join Lines instead of the
      ^!Replace below. Clips are normally much faster than RegExp, even
      though they take longer to write. In the one below though I just
      click on a button on my Tools Clipbar and it inserts the
      following into the document, so it is a matter of just typing in
      a few things.

      My "template" in which the cursor ends up in the first ^!Find
      between the quotes:

      :Loop
      ^!Find "CURSOR IS HERE" S
      ^!IfError End
      ^!Jump Select_
      ^!Set %Start%=^$GetRow$:^$GetCol$
      ^!Find "" S
      ^!Jump Select_
      ^!SelectTo ^%Start%
      ^!Goto Loop


      H=Join Non-Paragraphs
      ; Using Join Lines instead of Replace
      ; Optional Skip
      ^!SetHintInfo Working...
      ^!SetScreenUpdate Off
      :Loop
      ^!Find "^p " S
      ^!IfError End
      ^!Jump Select_End
      ^!Set %Start%=^$GetRow$:^$GetCol$
      ^!Find "^p " S
      ^!Jump Select_Start
      ^!SelectTo ^%Start%
      ; ^!Skip Skip this joining the lines of this selection?
      ^!Toolbar Join Lines
      ; ^!Replace "^p" >> " " SAH
      ^!Goto Loop


      Happy Clip'n!
      Jody

      All Lists: http://www.fookes.us/maillist.htm
      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
      Options: http://groups.yahoo.com/group/ntb-clips
      http://www.clean-funnies.com, http://www.sojourner.us/software
    • Mike Hopkins
      ... Thanks, Jody. I will try this tomorrow when I get home from (night shift) work. Mike
      Message 2 of 5 , Jun 1 9:11 PM
      • 0 Attachment
        > >How can I remove the EOL characters which are NOT followed by
        > >three spaces without removing the rest?
        >
        > You can also do it with ^!Toolbar Join Lines instead of the
        > ^!Replace below. Clips are normally much faster than RegExp, even
        > though they take longer to write. In the one below though I just
        > click on a button on my Tools Clipbar and it inserts the
        > following into the document, so it is a matter of just typing in
        > a few things.
        >
        > My "template" in which the cursor ends up in the first ^!Find
        > between the quotes:
        >
        > :Loop
        > ^!Find "CURSOR IS HERE" S
        > ^!IfError End
        > ^!Jump Select_
        > ^!Set %Start%=^$GetRow$:^$GetCol$
        > ^!Find "" S
        > ^!Jump Select_
        > ^!SelectTo ^%Start%
        > ^!Goto Loop
        >
        >
        > H=Join Non-Paragraphs
        > ; Using Join Lines instead of Replace
        > ; Optional Skip
        > ^!SetHintInfo Working...
        > ^!SetScreenUpdate Off
        > :Loop
        > ^!Find "^p " S
        > ^!IfError End
        > ^!Jump Select_End
        > ^!Set %Start%=^$GetRow$:^$GetCol$
        > ^!Find "^p " S
        > ^!Jump Select_Start
        > ^!SelectTo ^%Start%
        > ; ^!Skip Skip this joining the lines of this selection?
        > ^!Toolbar Join Lines
        > ; ^!Replace "^p" >> " " SAH
        > ^!Goto Loop


        Thanks, Jody. I will try this tomorrow when I get home from (night shift)
        work.

        Mike
      Your message has been successfully submitted and would be delivered to recipients shortly.