filter? replace? wildcard? reg exp? help please!

Thierry Douez th.douez at gmail.com
Fri May 12 16:37:58 EDT 2017


>
>
>>
>>
>>> function removeBrackets pString
>>>   return replacetext(pString,"\[.*\]",empty)
>>> end removeBrackets
>>>
>> ​​
>>
>> What would be the result of next  line:?
>>
>> *put* removeBrackets
>> ​( ​
>> "1 [A] 2 [B] 3."
>> ​)
>>
>
> An error. I did warn about my limited regex skills. :)

So what should it be?
>
> Also, that's a non-standard format for a function.

I've never seen it written that way before.


​

This should be a one-line command!
I've typed this post with the new Opera browser....
???


Another try with 2 lines:

put "1 [A] 2 [B] 3." into tText
put  removeBrackets( tText)

​Better?

Thierry​


------------------------------------------------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage



More information about the use-livecode mailing list