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

Clip to shorten record

Expand Messages
  • Robin Chapple
    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
    Message 1 of 4 , Nov 5, 2006
    • 0 Attachment
      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
    • Don - HtmlFixIt.com
      ... There are several ways Robin, but the easiest would be to get Jody s clip book library called noteblock and use the extract two fields clip I suppose.
      Message 2 of 4 , Nov 5, 2006
      • 0 Attachment
        Robin Chapple 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

        There are several ways Robin, but the easiest would be to get Jody's
        clip book library called noteblock and use the extract two fields clip I
        suppose. Myself I would split data into arrays with space as delimiter
        and keep the first two elements of that array. I am not sure what Jody
        does to get it split.
      • 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 3 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 4 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.