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

How do I do this?

Expand Messages
  • vbMark
    I have this: 01-04-2005 519627929lb bla bla bla and I need to cut the date and the space out out of the beginning and move it to the end. Select word does not
    Message 1 of 10 , Oct 17, 2005
    • 0 Attachment
      I have this:

      01-04-2005 519627929lb bla bla bla

      and I need to cut the date and the space out
      out of the beginning and move it to the end.

      Select word does not work for me because it
      stops at the dash.

      How do I do this?

      Thanks for your help!
    • John Zeman
      ... Perhaps with a RegExp clip like this? (Watch out for line breaks)? ^!Replace ^{[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]}{ s}{.*} 3 2 1 RTIWSA
      Message 2 of 10 , Oct 17, 2005
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...> wrote:
        >
        > I have this:
        >
        > 01-04-2005 519627929lb bla bla bla
        >
        > and I need to cut the date and the space out
        > out of the beginning and move it to the end.
        >
        > Select word does not work for me because it
        > stops at the dash.
        >
        > How do I do this?
        >
        > Thanks for your help!
        >

        Perhaps with a RegExp clip like this? (Watch out for line breaks)?

        ^!Replace "^{[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]}{\s}{.*}" >> "\3\2\1" RTIWSA


        John
      • vbMark
        ... Hmmm, interesting. I ll check that out. Thanks.
        Message 3 of 10 , Oct 18, 2005
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...>
          wrote:
          >
          > --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...> wrote:
          > >
          > > I have this:
          > >
          > > 01-04-2005 519627929lb bla bla bla
          > >
          > > and I need to cut the date and the space out
          > > out of the beginning and move it to the end.
          > >
          > > Select word does not work for me because it
          > > stops at the dash.
          > >
          > > How do I do this?
          > >
          > > Thanks for your help!
          > >
          >
          > Perhaps with a RegExp clip like this? (Watch out for line breaks)?
          >
          > ^!Replace "^{[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]}{\s}{.*}"
          >> "\3\2\1" RTIWSA
          >
          >
          > John
          >

          Hmmm, interesting. I'll check that out. Thanks.
        • vbMark
          ... I don t know how much the author is into implementing requests but I would like to see an option to select everything up to the next space.
          Message 4 of 10 , Oct 18, 2005
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...> wrote:
            >
            > I have this:
            >
            > 01-04-2005 519627929lb bla bla bla
            >
            > and I need to cut the date and the space out
            > out of the beginning and move it to the end.
            >
            > Select word does not work for me because it
            > stops at the dash.
            >
            > How do I do this?
            >
            > Thanks for your help!
            >

            I don't know how much the author is into implementing requests but I
            would like to see an option to select everything up to the next space.
          • thefrank
            ... here is one method: ^!Find ^!Select BOL ^!Set %date%=^$GetSelection$ ^!Keyboard BACKSPACE ^!Jump LINE_END ^!Keyboard SPACEBAR ^!InsertText ^%date%
            Message 5 of 10 , Oct 18, 2005
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...> wrote:
              >
              > I have this:
              >
              > 01-04-2005 519627929lb bla bla bla

              here is one method:

              ^!Find " "
              ^!Select BOL
              ^!Set %date%=^$GetSelection$
              ^!Keyboard BACKSPACE
              ^!Jump LINE_END
              ^!Keyboard SPACEBAR
              ^!InsertText ^%date%
              ^!Keyboard BACKSPACE
              ^!Jump +1

              regards,

              tf
            • vbMark
              ... Yep, cool. That will do it. Thanks!
              Message 6 of 10 , Oct 18, 2005
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, "thefrank" <tf@t...> wrote:
                >
                > --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...> wrote:
                > >
                > > I have this:
                > >
                > > 01-04-2005 519627929lb bla bla bla
                >
                > here is one method:
                >
                > ^!Find " "
                > ^!Select BOL
                > ^!Set %date%=^$GetSelection$
                > ^!Keyboard BACKSPACE
                > ^!Jump LINE_END
                > ^!Keyboard SPACEBAR
                > ^!InsertText ^%date%
                > ^!Keyboard BACKSPACE
                > ^!Jump +1
                >
                > regards,
                >
                > tf
                >

                Yep, cool. That will do it.

                Thanks!
              • hsavage
                ... 3 2 1 RTIWSA ... vb, tf, John, vb, I m assuming the bla bla bla represents additional text in the lines so you can t just move the date to eol. The 2
                Message 7 of 10 , Oct 18, 2005
                • 0 Attachment
                  thefrank wrote:
                  > --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...> wrote:
                  >> I have this:
                  >>
                  >> 01-04-2005 519627929lb bla bla bla
                  >
                  > here is one method:
                  >
                  > ^!Find " "
                  > ^!Select BOL
                  > ^!Set %date%=^$GetSelection$
                  > ^!Keyboard BACKSPACE
                  > ^!Jump LINE_END
                  > ^!Keyboard SPACEBAR
                  > ^!InsertText ^%date%
                  > ^!Keyboard BACKSPACE
                  > ^!Jump +1
                  >
                  > regards,
                  >
                  > tf

                  >> Perhaps with a RegExp clip like this? (Watch out for line breaks)?
                  >>
                  >> ^!Replace "^{[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]}{\s}{.*}" >>
                  "\3\2\1" RTIWSA

                  >> John
                  ------------

                  vb, tf, John,

                  vb, I'm assuming the 'bla bla bla' represents additional text in the
                  lines so you can't just move the date to eol. The 2 leading groups of
                  numbers need swapping so, how's this for a compromise.

                  I altered 'John's' and 'theFranks' previous suggestions for this clip.
                  It swaps the 2 number series without affecting the rest of the line. It
                  only works on dates that begin at the left margin.

                  Also, you can remove the comment from the ^!Jump and it will start at
                  the beginning of the file and do the entire file..


                  H="Date Mover"
                  ^!SetWordWrap 0
                  ; remove comment from this jump to start at top of file
                  ;^!Jump 1
                  :LOOP
                  ^!Find "^{[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]}{\s}" RS
                  ^!IfError END
                  ^!Set %date%=^$GetSelection$
                  ^!Keyboard DELETE
                  ^!MoveCursor +12
                  ^!InsertText ^%date%
                  ^!Goto LOOP


                  ºvº
                  05.10.18
                  hrs > hsavage@...
                • Alec Burgess (g)
                  ... Only because I can t resist sticking my oar in after the fact with yet another solution :-) I think this one-liner will do what you want: ^!replace
                  Message 8 of 10 , Oct 18, 2005
                  • 0 Attachment
                    Hi Mark:

                    > I don't know how much the author is into implementing
                    > requests but I
                    > would like to see an option to select everything up to
                    > the next space.

                    Only because I can't resist sticking my oar in after the fact with "yet
                    another solution" :-)

                    I think this one-liner will do what you want:

                    ^!replace "^{[^\s]+}\s+{.*}" >> "\2\s\1" rwsait

                    in words:
                    ^ = match begining of line
                    "{[^\s]+} = save the first string of non-spaces as \1
                    \s+ = match one or more spaces
                    {.*} = save remainder of line as \2

                    then replace by arg-2 onespace arg-1

                    Regards ... Alec
                    --
                    ; ( ) { } [ ] \ | 9 0 + = () {} []


                    ---- Original Message ----
                    From: "vbMark" <vbmark@...>
                    To: <ntb-clips@yahoogroups.com>
                    Sent: Tuesday, October 18, 2005 07:59
                    Subject: [gla: [Clip] Re: How do I do this?

                    > --- In ntb-clips@yahoogroups.com, "vbMark" <vbmark@g...>
                    > wrote:
                    >>
                    >> I have this:
                    >>
                    >> 01-04-2005 519627929lb bla bla bla
                    >>
                    >> and I need to cut the date and the space out
                    >> out of the beginning and move it to the end.
                    >>
                    >> Select word does not work for me because it
                    >> stops at the dash.
                    >>
                    >> How do I do this?
                    >>
                    >> Thanks for your help!
                    >>
                    >
                    > I don't know how much the author is into implementing
                    > requests but I
                    > would like to see an option to select everything up to
                    > the next space.
                    >
                    >
                    >
                    >
                    >
                    > ------------------------ Yahoo! Groups Sponsor
                    >
                    > Fookes Software: http://www.fookes.us,
                    > http://www.fookes.com
                    > Fookes Software Mailing Lists:
                    > http://www.fookes.us/maillist.htm
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                  • hsavage
                    ... Mark, Alec, John, theFrank, After seeing Alec s latest regexp pattern I re-evaluated my attempt. I can t get past the question of whether Mark actually
                    Message 9 of 10 , Oct 18, 2005
                    • 0 Attachment
                      Alec Burgess (g) wrote:
                      > Hi Mark:
                      >
                      > Only because I can't resist sticking my oar in after the fact with "yet
                      > another solution" :-)
                      >
                      > I think this one-liner will do what you want:
                      >
                      > ^!replace "^{[^\s]+}\s+{.*}" >> "\2\s\1" rwsait
                      >
                      > in words:
                      > ^ = match begining of line
                      > "{[^\s]+} = save the first string of non-spaces as \1
                      > \s+ = match one or more spaces
                      > {.*} = save remainder of line as \2
                      >
                      > then replace by arg-2 onespace arg-1
                      >
                      > Regards ... Alec

                      Mark, Alec, John, theFrank,

                      After seeing Alec's latest regexp pattern I re-evaluated my attempt. I
                      can't get past the question of whether Mark actually wants the date
                      moved to the end of line(EOL) or, does he want the date and the other
                      number transposed.

                      My previous clip transposed the 2 numbers without disturbing the rest of
                      the line, this latest regexp operates the same.

                      This is the result of my re-evaluation and the effect on a short file
                      using multiple copies of the one line example Mark sent.

                      The one-liner works only on lines that begin with numbers in this
                      particular date format, it swaps position of the first 2 number series,
                      I didn't have a very large example to test thoroughly but it works on
                      the test file I built, 23 lines to manipulate.

                      H="regexp Date Mover"
                      ^!Replace "^{[0-9-]+}\s{[0-9a-z]+}" >> "\2\s\1" WRSA

                      BEFORE
                      01-04-2005 519627929lb bla bla bla
                      01-04-2005 519627929lb bla bla bla
                      01-04-2005 519627929lb bla bla bla

                      AFTER
                      519627929lb 01-04-2005 bla bla bla
                      519627929lb 01-04-2005 bla bla bla
                      519627929lb 01-04-2005 bla bla bla

                      ºvº
                      05.10.18
                      hrs > hsavage@...
                    • Jody
                      Hi vbMark, ... In Pro, press Alt and double click to have NoteTab select from the cursor and include the first space it comes to. It, Alt-click, toggles
                      Message 10 of 10 , Oct 20, 2005
                      • 0 Attachment
                        Hi vbMark,

                        >> 01-04-2005 519627929lb bla bla bla
                        >>
                        >> and I need to cut the date and the space out
                        >> out of the beginning and move it to the end.
                        >>
                        >> Select word does not work for me because it
                        >> stops at the dash.
                        >>
                        >> How do I do this?
                        >>
                        >> Thanks for your help!
                        >
                        >I don't know how much the author is into implementing requests but I
                        >would like to see an option to select everything up to the next space.

                        In Pro, press Alt and double click to have NoteTab select from the cursor
                        and include the first space it comes to. It, Alt-click, toggles on/off. I
                        do not know if it works in Std/Light.


                        Happy Clip'n!
                        Jody

                        All Lists: http://www.fookes.us/maillist.htm
                        Convert your eMail programs... Aid4Mail: http://www.fookes/aid4mail
                        Freeware and Shareware; seamleesly integrates with NoteTab:
                        http://www.sojourner.us/software
                        See ya in the funnies!-) http://www.clean-funnies.com
                      Your message has been successfully submitted and would be delivered to recipients shortly.