Must be a way: escaping filter patterns

Bernard Devlin bdrunrev at gmail.com
Sun May 3 06:35:35 EDT 2009


I think this does what you require:

put "tr[1]" & cr after tList
put "tr(2)" & cr after tList
put "tr[3]" & cr after tList
put "tr[a]" & cr after tList
put "td[1]" & cr after tList
put "tra[1]" & cr after tList
filter tList without "[t][r]?[0-9]]"
put tList

Try playing around with the 2nd letter of the filter expression, and
using with/without.  It seems to work for me.  Unless I really don't
understand the problem :-)

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?
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list