Search / replace

Jim Ault jimaultwins at yahoo.com
Sat Feb 20 12:10:23 EST 2010


On Feb 20, 2010, at 8:29 AM, Jim Bufalini wrote:

> Jim Ault wrote:
>
>> -----------------------
>> Just in case there is a line ending in a number and the first char of
>> the next line is '['
>>  and you did not want that specific conversion
>>  change is back to a '[' char
>>
>>    replace (cr & "_") with (cr & "[") in newVersion
>
> Since, in the end, you shouldn't end up with any brackets and, since  
> the
> bracket is at the beginning of a line and therefore not "preceded"  
> by a
> number, it was just mistakenly converted to an "_" instead of empty  
> when the
> line endings were brackets. So, wouldn't the line be?:

I made the note because I did not know if a '[' was a legal char that  
was outside the parsing rules, and Glen should be aware that my  
routine would need this tweak depending on his final goal.  I made the  
assumption that it might be that all instances of '[' should not be  
removed, thus Glen can make the choice.

>
> replace (cr & "_") with (cr) in newVersion
>
> I think we both shouldn't type more than a couple of lines of code  
> freehand
> into emails. ;-)

Actually, I *always* run my code, then make a copy for the email  
(without color formatting)
It is too easy to dash of lines of code that become confusing, then  
have to send more emails as corrections.
This list is archived and used by new users who don't always know how  
to spot typos.

Such a great list of willing, clever contributors who show their  
creative solutions for all.

Jim Ault
Las Vegas






More information about the use-livecode mailing list