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

Modify block column

Expand Messages
  • Sandy Rozhon
    I have a file that contains columnar data that I wish to alter slightly. Instead of: L|2000-01-21|04:41| I d like the data to look like this:
    Message 1 of 3 , Feb 25, 2006
    • 0 Attachment
      I have a file that contains columnar data that I wish to alter
      slightly. Instead of:

      L|2000-01-21|04:41|

      I'd like the data to look like this:

      L|2000|01/21|04:41|

      I thought I could just use the MODIFY/BLOCK command to replace column
      7 with the bar "|" and similarly for the dash to slash conversion.
      The full line contains a lot more data than shown here, so simple
      search and replace isn't the answer. The ability to modify a
      specific column, is. Can this be done from the menu or do I need a
      clip? There are roughly 500 rows.

      Sandy
    • abairheart
      ... Modify -- block works on counted characters, rather than screen or database column. Tabs count as 1 character. If you can select the block you want to
      Message 2 of 3 , Mar 2, 2006
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "Sandy Rozhon" <srozhon@...> wrote:
        >
        > I have a file that contains columnar data that I wish to alter
        > slightly. Instead of:
        >
        > L|2000-01-21|04:41|
        >
        > I'd like the data to look like this:
        >
        > L|2000|01/21|04:41|
        >
        > I thought I could just use the MODIFY/BLOCK command to replace column
        > 7 with the bar "|" and similarly for the dash to slash conversion.


        Modify --> block works on counted characters, rather than screen or
        database column. Tabs count as 1 character. If you can select the
        block you want to move AND there are no embedded tabs, it will
        probably work. Why not just COPY the file to a test document, and TRY it?

        Since you want to change some individual characters, you'll have to do
        that in a separate search / replace operation.

        NOTE: if you select a block, then try to make a search/replace within
        the block, you might get some surprises. Replace does not work within
        the block, but within the selection.

        Abair
      • Don - HtmlFixIt.com
        ... I would write a clip, split each line to an array on the | delimiter, go to the second field in the array and replace the first - with a | and the second
        Message 3 of 3 , Mar 2, 2006
        • 0 Attachment
          abairheart wrote:
          > --- In ntb-clips@yahoogroups.com, "Sandy Rozhon" <srozhon@...> wrote:
          >> I have a file that contains columnar data that I wish to alter
          >> slightly. Instead of:
          >>
          >> L|2000-01-21|04:41|
          >>
          >> I'd like the data to look like this:
          >>
          >> L|2000|01/21|04:41|

          I would write a clip, split each line to an array on the | delimiter, go
          to the second field in the array and replace the first - with a | and
          the second with a /.

          It could also easily be done with a regex.
        Your message has been successfully submitted and would be delivered to recipients shortly.