18988Re: [Clip] Re: Using regex to insert a comment
- Mar 4, 2009Um yes Flo, can you break that down for the slow kids in the back here?
> 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
>> ^!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
- << Previous post in topic Next post in topic >>