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

Re: Clip to shorten record

Expand Messages
  • Sheri
    Hi Robin, If you put the following replace command into a clip and run it, it will delete every thing from the second space thru the end of the line for every
    Message 1 of 4 , Nov 5, 2006
    • 0 Attachment
      Hi Robin,

      If you put the following replace command into a clip and run it, it
      will delete every thing from the second space thru the end of the
      line for every line in the document. The following requires NoteTab
      version 5.1.

      ^!Replace "(.+?\x20.+?)\x20.+" >> "$1" RASW0

      Another way to do it which works in 5.1 and earlier versions would be

      Find the second space,
      select to the end of the line,
      and delete

      until there are no more:

      ^!Jump Doc_Start
      :Start
      ^!Find " " S
      ^!IfError End
      ^!Find " " S
      ^!Info
      ^!IfError End
      ^!Select EOL
      ^!Menu Edit/Delete
      ^!Jump +1
      ^!Goto Start

      Regards,
      Sheri

      --- In ntb-clips@yahoogroups.com, Robin Chapple <robinski@...> wrote:
      >
      >
      > I am real beginner.
      >
      > I use NoteTab, amongst other things, to give me clean
      > text for web pages.
      >
      > I need to produce a regular report that lists pages and
      > visitors.
      >
      > When the html is cleared by NoteTab I am left with
      > nearly 1000 lines like this:
      >
      > /main/index.htm 65 845 Bytes 23 4
      >
      > I need to retain the filename and visitor count which
      > is the first digits, which could be a group on one, two
      > or three characters.
      >
      > So I need a clip which says "Keep the first two
      > 'columns'. Delete after the second space.
      >
      > That is beyond my limited abilities.
      >
      > Your suggestions are welcomed.
      >
      > Robin Chapple
      >
    • loro
      ... Or you could find the word Bytes , back a step to include the space and delete to the end of the line. Something like this. ... H= KillBytes ^!Jump
      Message 2 of 4 , Nov 6, 2006
      • 0 Attachment
        At 00:37 2006-11-06, Robin Chapple wrote:
        >When the html is cleared by NoteTab I am left with nearly 1000 lines like
        >this:
        >
        >/main/index.htm 65 845 Bytes 23 4
        >
        >I need to retain the filename and visitor count which is the first
        >digits, which could be a group on one, two or three characters.
        >
        >So I need a clip which says "Keep the first two 'columns'. Delete
        >after the second space.

        Or you could find the word "Bytes", back a step to include the space and
        delete to the end of the line. Something like this.

        ----------------------
        H="KillBytes"

        ^!Jump doc_start
        ^!SetScreenUpdate Off

        :loop
        ^!Find "Bytes" CIS
        ^!IfError fin
        ^!MoveCursor -1
        ^!Select EOL
        ^!Replace "^$GetSelection$" >> ""
        ^!Goto loop

        :fin
        ^!Info Done!
        ----------------------

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