How to replace just the first found space with tab for all lines in a variable?
Jim Ault
jimaultwins at yahoo.com
Thu May 26 07:23:29 EDT 2011
On May 26, 2011, at 3:11 AM, Alex Tweedly wrote
>
> How embarrassing !!
> I tested this in my message box, and had a typo (almost invisible
> space) in the input data.
> Sorry Jim (and Keith).
Nah, Alex, not embarrassing at all.
This is how everyone learns some of the odd rules.
This is probably only the second time you made a typo after all these
years on the list.
and I can't remember the first one :-)
So many of us enjoy quickly answering questions and solving puzzles,
it is natural that bloopers will happen.
I think the key is to have fun with them.
Jim Ault
Las Vegas
>
> On 26/05/2011 04:39, Jim Ault wrote:
>> On May 25, 2011, at 8:41 AM, Alex Tweedly wrote:
>>
>>> Beware this will get the (possibly) wrong result for some data.
>>> For instance, a comma will terminate a word, so
>>> a,b def
>>> will give you a key of "aTABb def"
>>> rather than a key of "a,TABdef"
>>>
>> Punctuation is not considered a word delimiter, so the comma will
>> remain attached to the string.
>>
>> put word 1 of "a,b def" into msg
>> -- I get "a,b" using Rev 3.5
>>
>> In fact, if the words have trailing commas, the punctuation is
>> considered part of the word
>>
>> put word 2 of "He spoke, therefore he was heard"
>> => the 6 chars 'spoke,'
>>
>> put word 2 of "nice ,,and,,,,,,,,,, warm"
>> => ,,and,,,,,,,,,,
>>
>> put word 2 of "really ...-and_,;]/><? truly"
>> => ...-and_,;]/><?
>>
>> Hope this helps
>> Jim Ault
>>
More information about the use-livecode
mailing list