Re: Must be a way: escaping filter patterns

2009-05-03 Thread David Bovill
This would "usually" work : put "theader[1]" & cr after tList put "th(1)" & cr after tList put "th(2)" & cr after tList put "th[3]" & cr after tList put "tbody[1]" & cr after tList put "tr[1]" & cr after tList put "td[2]" & cr after tList put "tra[3]" & cr after tList put "tr[11]" & cr after tList

Re: Must be a way: escaping filter patterns

2009-05-03 Thread Bernard Devlin
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

Re: Must be a way: escaping filter patterns

2009-05-03 Thread David Bovill
Thanks Jim - good to confirm that there is no way to escape chars for filter expressions. I guess this is the sort of thing that should be posted as a note to the dictionary. 2009/5/2 Jim Ault > The technique I have used in the past is to do a > > replace "[" with "†" in blockOfLines > replace "

Re: Must be a way: escaping filter patterns

2009-05-02 Thread Jim Ault
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 H

Re: Must be a way: escaping filter patterns

2009-05-02 Thread David Bovill
Afraid not :( 2009/5/2 Bernard Devlin > 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 "[[*]]" > > B

Re: Must be a way: escaping filter patterns

2009-05-02 Thread Bernard Devlin
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 wrote

Re: Must be a way: escaping filter patterns

2009-05-01 Thread David Bovill
OK - thanks! 2009/5/1 Sarah Reichelt > On Sat, May 2, 2009 at 6:11 AM, David Bovill 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 "" > elements > > which appear like tr[1], tr[2]. So I wa

Re: Must be a way: escaping filter patterns

2009-05-01 Thread Sarah Reichelt
On Sat, May 2, 2009 at 6:11 AM, David Bovill 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 "" elements > which appear like tr[1], tr[2]. So I want to filter using "tr[*]", but as > "[" is a specia

Must be a way: escaping filter patterns

2009-05-01 Thread David Bovill
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 "" 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 i