Re: [Clip] Find Unused Char
- Hi Don,
Well, I was right about one thing - it would not have been worth it - for me.
It would have taken me many hours to design, write & debug your script.
And it would have been quite different and probably not as efficient. But I
will save yours for possible future use. Thanks.
I don't remember if I have ever used arrays so I had to them up to see what
was going on. That's one of the benefits of this list - one can actually learn
At 11/21/2008 05:48 PM, you wrote:
>Oddly I just did this for a different clip I wrote ... you have to be
>careful what special characters you use if you then use a regex search
>with the variable in it as some special characters have meaning other
>than literal in the regex.
>; find an odd character we can use for processing
>; the odd character cannot appear in the file
>; let's find an odd character not in the file ...
>^!If "^%odd_character_count%" > "^%odd_character_delimiter0%" ERROR
>^!Find "^%odd_character_delimiter^%odd_character_count%%" CIWS
>; if this special character is in file loop again
>^!IfError NEXT ELSE Loop_Odd_Character
>; replace all paragraphs with special character
>^!Replace "^P" >> "^%odd_character_delimiter^%odd_character_count%%" ACIWS
>And so forth.
>Art Kocsis wrote:
> > One could make this clip even more robust by testing the selection for
> > the existence of the character and exiting or trying another character if
> > found, but it is probably not worth the effort.