<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>(My Trie has
morphed into consideration of ETS pattern matching.)</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>Does anyone know
if ETS can support pattern matching on "the rest of a list of terms" if the key
is a list of terms?</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>All my keys are
lists. I need to match on parts of the key and on the elements near the
head of the list.</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>Examples:</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>Given
keys:</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>[a,b,c,d]</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>[a,b,c]</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>[a,b]</FONT></SPAN></DIV>
<DIV><FONT face=Georgia size=2></FONT> </DIV>
<DIV><FONT face=Georgia size=2><SPAN class=561071814-06012003>Find all three
with the following pattern:</SPAN></FONT></DIV>
<DIV><FONT face=Georgia size=2><SPAN
class=561071814-06012003></SPAN></FONT> </DIV>
<DIV><FONT face=Georgia size=2><SPAN
class=561071814-06012003>[a,'*']</SPAN></FONT></DIV>
<DIV><FONT face=Georgia size=2></FONT> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>Find the last two
with this pattern:</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>[a,b,'*']</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>Find [a,b] with
this pattern:</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>['_',b]</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2>etc.</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>I think the '_'
works. But is there a mechanism like '*' that can match the rest of an
arbitrary length key that is a list, sort of like _='_' in some other database
module?</FONT></SPAN></DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=561071814-06012003><FONT face=Georgia size=2>I know I could
keep track of the maximum list length and perform multiple queries appending '_'
to the maximum length. But that seems yucky.</FONT></SPAN></DIV>
<DIV><FONT face=Georgia size=2></FONT> </DIV><FONT size=2><SPAN
class=758175113-15032002><FONT face=Georgia size=2><FONT face=Georgia></FONT>
<DIV align=left><FONT size=2>Sincerely,</FONT></DIV>
<DIV align=left>Eric</DIV>
<DIV align=left></FONT></SPAN> </DIV></FONT>
<DIV> </DIV></BODY></HTML>