Advanced ETS Pattern Matching

Eric Newhuis <>
Mon Jan 6 17:28:10 CET 2003

(My Trie has morphed into consideration of ETS pattern matching.)
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?
All my keys are lists.  I need to match on parts of the key and on the
elements near the head of the list.
Given keys:
Find all three with the following pattern:
Find the last two with this pattern:
Find [a,b] with this pattern:
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?
I know I could keep track of the maximum list length and perform
multiple queries appending '_' to the maximum length.  But that seems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list