Would this help?

  put "ps,europe" into tSearch
  repeat for each item tItem in tSearch
    replace tItem with "%" & tItem in tFileList
  end repeat
  filter tFileList with "*%*"
  replace "%" with "" in tFileList

This does a "or" choice and returns the file that contain ps or europe. I let you work out how to do a "and" choice if you need so. For it to work, "%" must be a character that will never appear in any of you file string.

Cheers,
Marielle

On 25 Oct 2006, at 17:04, Mark Powell wrote:

Another text filtering question, please.  I have studied the archives
but have not found precisely the solution that works.

I have a container vContainer of file names, each line of the form

  <directory>/!?!<filename>!/<filesize>/<creationdate>

Here are three literal examples:

  C:/The World/Asia/!?!prologue.ps!/1026/1115309596
  C:/The World/Europe/!?!Map of Europe.jpg!/3536844/1155845730
  C:/The World/!?!About1953.txt!/4288/1161776573

User-input text strings can define what files from vContainer are to be
retained. The following works to filter-in the first example above:

  filter vContainer with ("*!*.ps*!*")

However, if the user wants both ".ps" and "Europe" to be retained, how
best to do it without repeat loops and a lot of temporary copies of
vContainer?  Is there a way?

One catch is that if the user inputs something like "53", the operation must recognize the fact that the "53" in the first two examples is not a
part of the file name, thereby filtering them out, but that "53" is a
part of the file name in the third example, thereby filtering it in.
This is one reason for the exclamation point tokens in vContainer.

Any ideas greatly appreciated.

Mark Powell

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

------------------------------------------------
Marielle Lange (PhD),  http://widged.com
Bite-size Applications for Education





_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to