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

working with a column of data

Expand Messages
  • Don
    I want to work on one column of data on each line. The example I am working on today looks like this: 1 Tom Van Gogh Brother Rice 184 16:09.2 5:13/M 2 John
    Message 1 of 5 , Sep 4, 2011
    • 0 Attachment
      I want to work on one column of data on each line.

      The example I am working on today looks like this:
      1 Tom Van Gogh Brother Rice 184 16:09.2 5:13/M
      2 John Carl Pennington Brother Rice 191 16:10.0 5:13/M
      3 T.J. Carey Lake Orion 295 16:37.8 5:22/M
      4 Nick Soter Divine Child 38 16:50.3 5:26/M

      Column 3 is a name. I want to look at that name and split it in half,
      however it may not always have one space, sometimes it may have two or
      even three.

      I want to then be prompted for which space to replace with a tab.

      Is there a way to pull column 3 out once you know what the delimiter is?
    • Axel Berger
      ... Easy: ^!Find ^([^ t]* t){2}([^ t]+) t RASTI2 After that the find is highlighted. You can work on ^$GetSelection$ and write the result with ^!InsertText.
      Message 2 of 5 , Sep 4, 2011
      • 0 Attachment
        Don wrote:
        > Is there a way to pull column 3 out once you know what the delimiter is?

        Easy:
        ^!Find "^([^\t]*\t){2}([^\t]+)\t RASTI2

        After that the find is highlighted. You can work on ^$GetSelection$ and
        write the result with ^!InsertText. Then loop.

        Axel
      • Don
        ... Sorry insufficient info on my part, it could be any column, not always three. I think there is a way to get things in column x but I m drawing a blank.
        Message 3 of 5 , Sep 4, 2011
        • 0 Attachment
          On 9/4/2011 11:32 AM, Axel Berger wrote:
          > Don wrote:
          >> Is there a way to pull column 3 out once you know what the delimiter is?
          >
          > Easy:
          > ^!Find "^([^\t]*\t){2}([^\t]+)\t RASTI2
          >
          > After that the find is highlighted. You can work on ^$GetSelection$ and
          > write the result with ^!InsertText. Then loop.
          >
          > Axel

          Sorry insufficient info on my part, it could be any column, not always
          three. I think there is a way to get things in column x but I'm drawing
          a blank.
        • Don
          ... I m thinking it is GetField I was looking for. I rediscovered the clip NoteTab Googler (awesome clip that searches the past messages) and also came across
          Message 4 of 5 , Sep 4, 2011
          • 0 Attachment
            On 9/4/2011 11:42 AM, Don wrote:
            > On 9/4/2011 11:32 AM, Axel Berger wrote:
            >> Don wrote:
            >>> Is there a way to pull column 3 out once you know what the delimiter is?
            >>
            >> Easy:
            >> ^!Find "^([^\t]*\t){2}([^\t]+)\t RASTI2
            >>
            >> After that the find is highlighted. You can work on ^$GetSelection$ and
            >> write the result with ^!InsertText. Then loop.
            >>
            >> Axel
            >
            > Sorry insufficient info on my part, it could be any column, not always
            > three. I think there is a way to get things in column x but I'm drawing
            > a blank.

            I'm thinking it is GetField I was looking for.

            I rediscovered the clip NoteTab Googler (awesome clip that searches the
            past messages) and also came across Jody's posts/site (sadly now gone in
            both cases) but not forgotten in the case of our departed friend Jody.
            What a great notetab friend. Is Jody's work archived somewhere?
          • Axel Berger
            ... Yes. This one was so simple to make from scratch, I never thought of looking for a ready-made function, but as it s there, we might as well use it. ...
            Message 5 of 5 , Sep 4, 2011
            • 0 Attachment
              Don wrote:
              > I'm thinking it is GetField I was looking for.

              Yes. This one was so simple to make from scratch, I never thought of
              looking for a ready-made function, but as it's there, we might as well
              use it.

              > Sorry insufficient info on my part, it could be any column, not
              > always three. I think there is a way to get things in column x
              > but I'm drawing a blank.

              Well, if it's column x, there will be (x-1) columns in front of it. So
              just replace my "2" with "(x-1)" and you're done. With clips being a
              macro-language, I'd expect it might even accept a variable in there.

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