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

Re: [Clip] moving values around on a line...

Expand Messages
  • Alec Burgess
    Bill This should do it: H= date to beg-of-line ^!replace ^{.*}, { d d}/{ d d}/{ d d d d} , [0123456789 .]+ .* 2/ 3/ 4: 1 rwsa I m assuming that there
    Message 1 of 2 , Dec 11, 2003
    • 0 Attachment
      Bill
      This should do it:
      H="date to beg-of-line"
      ^!replace "^{.*},"{\d\d}/{\d\d}/{\d\d\d\d}","[0123456789\.]+".*" >>
      "\2/\3/\4: \1" rwsa

      I'm assuming that there is really a comma+quote before the date string that
      need to be stripped too
      ie:
      > ...,"01/14/2003","14"

      this would be a simpler replace line. When I started to write the above I
      hadn't look closely and assumed you wanted to do a date conversion too eg.
      mm/dd/yyyy --> yyyy/mm/dd. If that's not needed this will do the job.


      H="date to BOL-simple"
      ^!replace "^{.*},"{\d\d/\d\d/\d\d\d\d}","[0123456789\.]+".*" >> "\2: \1"
      rwsa

      REGEX rules ! :-)
      (note either of the above can be done using the replace dialog without using
      a clip)

      Regards ... Alec
      --

      ---- Original Message ----
      From: "NetAware" <bhc@...>
      To: "Notetab Clips forum" <ntb-clips@yahoogroups.com>
      Sent: Thursday, December 11, 2003 19:16
      Subject: [gla: [Clip] moving values around on a line...

      > I have the following date & other numerica values toward the end of
      > each line of CSV's:
      > ...01/14/2003","14"
      >
      > I want to remove everything after the year value (","14" in the above
      > example), select the date string (01/14/2003 in the above exp.), move
      > the date to the beginning of the same line & follow it with a
      > semi-colon & a space (eg, 05/22/2004: ). The values I want to delete
      > in the last set of quotes ("14" in the above) vary -- they might be
      > nothing ("") or larger or smaller than my example (eg, "238" / "1" /
      > "3.2" / etc.). How do I do this?
    • Jody
      Hi Alec & Bill, ... If you have a large file there is a chance the RegExp will bog out on you. I think I have all the bugs fixed that were sent to me in my
      Message 2 of 2 , Dec 12, 2003
      • 0 Attachment
        Hi Alec & Bill,

        >H="date to beg-of-line"
        >^!replace "^{.*},"{\d\d}/{\d\d}/{\d\d\d\d}","[0123456789\.]+".*" >>
        >"\2/\3/\4: \1" rwsa

        If you have a large file there is a chance the RegExp will bog
        out on you. I think I have all the bugs fixed that were sent to
        me in my NoteBlock Library. The Clip, Reorder Fields will do what
        you want provided there are not more than 20 fields in a line
        (but you can edit the Clip to do more if needed). You can reorder
        the fields and delete at the same time. You'll need to know what
        field (as in the number from left to right), so you might want to
        do it a bit at a time.

        http://www.notetab.net/zip/noteblock.zip <-- Library only
        http://www.notetab.net/zip/noteblockbar.zip <-- with Clipbar and icons

        >REGEX rules ! :-)

        Dogz rule, catz make great targets! (:?Þ~~~~~)

        See ya in the funnies!
        jody

        []

        clean-funnies.com, fookes.us, notetab.net
        sojourner.us, purewords.org, sureword.net


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