Re: Using the or operator with filter

2013-07-20 Thread Peter M. Brigham
How about something like this: put tList into list1 put tList into list2 put tList into list3 filter list1 with * item 1 of gCodes * filter list2 with * item 2 of gCodes * filter list3 with * item 3 of gCodes * put list1 cr list2 cr list3 into outputList -- Peter Peter M. Brigham

Re: Using the or operator with filter

2013-07-20 Thread Mark Wieder
Peter- Saturday, July 20, 2013, 9:22:00 AM, you wrote: How about something like this: put tList into list1 put tList into list2 put tList into list3 filter list1 with * item 1 of gCodes * filter list2 with * item 2 of gCodes * filter list3 with * item 3 of gCodes * put list1 cr

Re: Using the or operator with filter

2013-07-20 Thread Roger Eller
Thanks Peter. That would work fine for a fixed list, or the current 3 items, but if the list grows, I would have to edit the script. I ended up using repeat for each, and since even the large list is less than 100 lines, it is done in a few milliseconds. ~Roger On Jul 20, 2013 12:22 PM, Peter

Using the or operator with filter

2013-07-11 Thread Roger Eller
global gCodes put tList into tGood; put tList into tBad put PPX,RRY,NNZ into gCodes -- Keep lines that contain any item of gCodes filter tGood with (* item 1 of gCodes *) or (* item 2 of gCodes *) or (* item 3 of gCodes *) filter tBad without (* item 1 of gCodes *) or (* item 2 of gCodes

Re: Using the or operator with filter

2013-07-11 Thread Richard Gaskin
Roger Eller wrote: global gCodes put tList into tGood; put tList into tBad put PPX,RRY,NNZ into gCodes -- Keep lines that contain any item of gCodes filter tGood with (* item 1 of gCodes *) or (* item 2 of gCodes *) or (* item 3 of gCodes *) filter tBad without (* item 1 of gCodes *) or

Re: Using the or operator with filter

2013-07-11 Thread Roger Eller
Thanks Richard. To give a better picture of the requirements, the gCodes will be read from a user editable preference file (.txt), so there could easily be 3 or more (or less) items that have to be examined for each line of tList (a report file). At the moment, it works for the hard-coded 3

Re: Using the or operator with filter

2013-07-11 Thread Dar Scott
I'd be inclined to do this: repeat for each line... repeat for each item... And check for contains as you are thinking. This goes through tList only once. (I'm assuming that tList is large and gCodes is small.) Other ideas: I think filter does not use a real regex. If it does you can