Must be a way: escaping filter patterns

Jim Ault jimaultwins at yahoo.com
Sat May 2 15:03:38 EDT 2009


The technique I have used in the past is to do a

replace "[" with "†" in blockOfLines
replace "]" with "^" in blockOfLines
filter blockOfLines without "tr††*^^"
--and in case there are kept lines that had the '[]' chars
replace "†" with "[" in blockOfLines
replace "^" with "]" in blockOfLines


Hope this helps

Jim Ault
Las Vegas

On May 2, 2009, at 4:26 AM, David Bovill wrote:

> Afraid not :(
>
> 2009/5/2 Bernard Devlin <bdrunrev at gmail.com>
>
>> does this work?
>>
>> filter tXmlText with "*tr[[2]]"
>>
>> When you wrote to the list about this problem before, I did a quick
>> test and that seemed to work, so I thought "maybe I don't get the
>> problem".
>>
>> I'm not sure if it will work using "[[*]]"
>>
>> Bernard
>>
>> On Fri, May 1, 2009 at 9:11 PM, David Bovill <david at architex.tv>  
>> wrote:
>>> Still trying to figure this out - my hack ends up failing - I've  
>>> returned
>> a
>>> list of child names from XML, and wish to filter out all the "<tr>"
>> elements
>>> which appear like tr[1], tr[2]. So I want to filter using "tr[*]",  
>>> but as
>>> "[" is a special char... andthe usual "\[" does not work for  
>>> escaping?
>> Any
>>> ideas?
>>>
>>> 2009/4/24 David Bovill <david at architex.tv>
>>>
>>>> Any one know the way to escape characters such as "[" in patterns  
>>>> for
>> the
>>>> "filter" expression?




More information about the use-livecode mailing list