On Thu, 27 Jan 2005 00:16:44 +1100, johnf@...
>�On Wed, 26 Jan 2005 03:04:19 -0800, Alan_C wrote:
>>^!Replace "^p^p" >>�"^p~^p~" WAS
>>^!Replace "^p[^~]" >>�"," WASR
>>^!Replace "^p~^p~" >>�"^p^p" WAS
>>Does that work? No.
(I began only on the \n for the regex problem. Then, it didn't take long to throw it together. Tested it too. Over and out (adios amigos). | Alan. )
Token (^p) is wrong in regex. Instead, need use a \n
Also, the third replace line needed to be slightly different.
Fixed for entire file now is no longer allowed to be one great huge long line :-) Fixed for \n in regex. Fixed the third replace line. Added: pre testing of line breaks; pre testing of the consecutive rows of text; pass or fail the tests with corelating appropriate info notice; After the passing of the tests, added a Continutation prompt with a pre comma reminder notice. Also added a crawl (slower, testing) mode as an option it's set currently at zero for its turned off -- change the zero to a 1 to turn it on if ever desired to do so.
; two user configurable items next
; test (slower) mode. 1 for on or 0 for off
; amnt is # of consecutive rows of text
; -- end of user configurable items ------
^!Replace "^p^p^p" >> "^p^p" WAS
^!Find "^p^p^p" WAS
^!IfError next else line_break_do
^!Find "^p^p" S
^!Find "^p^p" S
^!If ^%crawl%=0 Skip_2
^!Skip ^%dif% rows. Go more?
^!IfSame "^%dif%" "^%amnt%" consec_rows_do
^!Info ERR: Terminating now. NOT ^%amnt% rows near cursor
^!Continue Passed ^%amnt% row check DID U comma DO? Go on?
^!Replace "^p^p" >> "^p~^p~" WAS
^!Replace "[^~]\n" >> "," WASR
^!Replace ",~^p~" >> "^p^p" WAS
; --- end of clip ----