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

Re: [NTB] Need help - reformat text clip

Expand Messages
  • Alec Burgess
    westerman2010 (westerman@cableone.net) wrote (in part) (on 2010-02-01 ... You had me wondering there what was going on ... your examples had -- separators
    Message 1 of 9 , Feb 1, 2010
      westerman2010 (westerman@...) wrote (in part) (on 2010-02-01
      at 19:32):
      > Got it to work. If there is no carrage return (line break) at the end
      > of the text nothing happens. If I go to end of text with cursor, then
      > hit enter, then run clip, it runs.
      >
      > Thanks Craig
      >
      > --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
      > > >
      > > > Craig:
      > > >
      > > > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
      > > > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai

      You had me wondering there what was going on ... your examples had "--"
      separators in between them so I hadn't attempted to make it "safe" at
      end-of-file.

      If you change the trailing \r\n in the find clause to optional ie:
      (?:\r\n)? it should work either way. (Note the 'w' in 'rwsai' options
      means process start of file not from cursor. Selected or not selected
      would only be relevant if an 'h' option were include (eg rwsaih)

      so clip becomes (again it will wrap in Yahoo):
      H="work test"
      ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)(?:\r\n)" >>
      ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai

      btw: interesting that Don's solution focused on subject knowledge (names
      of the Gospels) while mine focused on the format of numeric identifier.
      I haven't tested his but assume it works too :-)

      --
      Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




      [Non-text portions of this message have been removed]
    • Don - HtmlFixIt.com
      I m wondering if Craig had the clips wrapped ... the command is all on one line. I was going off of some prior bible work we did around here and if I remember
      Message 2 of 9 , Feb 1, 2010
        I'm wondering if Craig had the clips wrapped ... the command is all on
        one line.

        I was going off of some prior bible work we did around here and if I
        remember correctly some citations did not follow that data format ... so
        I figured books might be the safer bet.

        Alec Burgess wrote:
        > westerman2010 (westerman@...) wrote (in part) (on 2010-02-01
        > at 19:32):
        >> Got it to work. If there is no carrage return (line break) at the end
        >> of the text nothing happens. If I go to end of text with cursor, then
        >> hit enter, then run clip, it runs.
        >>
        >> Thanks Craig
        >>
        >> --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
        >> > >
        >> > > Craig:
        >> > >
        >> > > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
        >> > > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
        >
        > You had me wondering there what was going on ... your examples had "--"
        > separators in between them so I hadn't attempted to make it "safe" at
        > end-of-file.
        >
        > If you change the trailing \r\n in the find clause to optional ie:
        > (?:\r\n)? it should work either way. (Note the 'w' in 'rwsai' options
        > means process start of file not from cursor. Selected or not selected
        > would only be relevant if an 'h' option were include (eg rwsaih)
        >
        > so clip becomes (again it will wrap in Yahoo):
        > H="work test"
        > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)(?:\r\n)" >>
        > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
        >
        > btw: interesting that Don's solution focused on subject knowledge (names
        > of the Gospels) while mine focused on the format of numeric identifier.
        > I haven't tested his but assume it works too :-)
        >
      • Don - HtmlFixIt.com
        Alec, if you don t include the ^ at the start, then you will find the citations again on a re-run and things will be all out of whack, I think ...
        Message 3 of 9 , Feb 1, 2010
          Alec, if you don't include the ^ at the start, then you will find the
          citations again on a re-run and things will be all out of whack, I think ...

          Alec Burgess wrote:
          > westerman2010 (westerman@...) wrote (in part) (on 2010-02-01
          > at 19:32):
          >> Got it to work. If there is no carrage return (line break) at the end
          >> of the text nothing happens. If I go to end of text with cursor, then
          >> hit enter, then run clip, it runs.
          >>
          >> Thanks Craig
          >>
          >> --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
          >> > >
          >> > > Craig:
          >> > >
          >> > > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
          >> > > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
          >
          > You had me wondering there what was going on ... your examples had "--"
          > separators in between them so I hadn't attempted to make it "safe" at
          > end-of-file.
          >
          > If you change the trailing \r\n in the find clause to optional ie:
          > (?:\r\n)? it should work either way. (Note the 'w' in 'rwsai' options
          > means process start of file not from cursor. Selected or not selected
          > would only be relevant if an 'h' option were include (eg rwsaih)
          >
          > so clip becomes (again it will wrap in Yahoo):
          > H="work test"
          > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)(?:\r\n)" >>
          > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
          >
          > btw: interesting that Don's solution focused on subject knowledge (names
          > of the Gospels) while mine focused on the format of numeric identifier.
          > I haven't tested his but assume it works too :-)
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.