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

Re: [NTB] Need help - reformat text clip

Expand Messages
  • 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 1 of 9 , Feb 1, 2010
    • 0 Attachment
      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.