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

[Clip] Deleting all empty lines

Expand Messages
  • Ralf
    Hi, I d like to delete all empty lines in a document, but I can t get it done. What I tried so far is this: a) I used the ^!Replace command in regex mode and
    Message 1 of 3 , Feb 5, 2003
    • 0 Attachment
      Hi,

      I'd like to delete all empty lines in a document, but I
      can't get it done. What I tried so far is this:

      a) I used the ^!Replace command in regex mode and replaced "\n\n"
      with "\n". What happens is that *all* lines in the document are
      deleted (*hu*?).

      b) I tested the content of the line. If it matches "" (nothing) then
      I do a ^!DeleteLine and move on with ^!Jump +1. But this only works
      for a single empty line so consecutive empty lines can only be
      caught if I test again on content and skip the delete-command if the
      line is not empty.

      Phew. This again only works in a loop and since NoteTab doesn't know
      looping (except the label-jumping) I'm lost in the mass of commands
      and functions.

      Could someone give me a hint how I can delete all empty lines in a
      document without writing a huge script? I bet there's an easier way
      to achieve what I am trying to do.

      Thanks
      Ralf
    • Piotr Bienkowski
      ... Hi, There s a menu command to do it: Modify / Lines / Compress HTH Piotr
      Message 2 of 3 , Feb 5, 2003
      • 0 Attachment
        On 5 Feb 2003 at 22:14, Ralf wrote:

        > Hi,
        >
        > I'd like to delete all empty lines in a document, but I
        > can't get it done. What I tried so far is this:

        Hi,

        There's a menu command to do it:

        Modify / Lines / Compress

        HTH

        Piotr
      • Jody
        Hi Ralf, ... The ^p token is used for CR/LF, a new line, so two of them look for two lines with no data in between. H=Remove Empty Lines ^!Replace ^p^p
        Message 3 of 3 , Feb 5, 2003
        • 0 Attachment
          Hi Ralf,

          >I'd like to delete all empty lines in a document,

          The ^p token is used for CR/LF, a new line, so two of them
          look for two lines with no data in between.

          H=Remove Empty Lines
          ^!Replace "^p^p" >> "^p" WAS
          ^!IfError Next else Skip_-1


          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@yahoogroups.com
          mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
          http://groups.yahoo.com/group/ntb-clips


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.