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

18987Re: Using regex to insert a comment

Expand Messages
  • paulmaser
    Mar 4, 2009
    • 0 Attachment
      Once again, your regex is beyond my ability to comprehend and I will have to dive into the manual to understand what you are doing. It looks like it gives me exactly what I needed. Using the clipboard to store is pretty nifty. Your use of \K is really inovative.
      Thanks again;

      > When running the following clip on these lines...
      > ^!SetScreenUpdate Off
      > ^!SetWordWrap Off
      > ^!Jump Doc_Start
      > :Start
      > ^!Find "(?s)^<!--[^-]+-->\x20\r\n<li>.+?((?=^<!)|\Z)" RS
      > ^!IfError End
      > ; Long line start
      > ^!SetClipboard ^$GetDocMatchAll("^<\!--\x20\K([^-]+)(?=-->\x20\r\n<li>)")$
      > ; Long line end
      > ^!Replace "(<li>)(<b>)" >> "$1^$GetClipboard$$2" HARS
      > ^!Jump Select_End
      > ^!If ^$GetRow$=^$GetTextLineCount$ End
      > ^!Goto Start
    • Show all 15 messages in this topic