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

21632Re: [NTB] Need help - reformat text clip

Expand Messages
  • Don - HtmlFixIt.com
    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 :-)
      >
    • Show all 9 messages in this topic