Substring query
Date: Thu, 15 Feb 2001 01:36:04 +0100
Message-ID: <3A8B2474.732DE2FD_at_wapmore.com>
Hi,
I have a situation where whole classes of keys correspond to a single database entry - that is, the key in the database should be a pattern rather than an exact string.
What I need is to be able to create a funktion ´lookup´, where
lookup(string) = { entry(key) | string matches key }
Alternately it could be
lookup(string) = { entry(key) | key is a substring of string }
where the entry could be a (regexp,realkey) pair, and I could check the entries of the returned set in turn.
In short, the problem is thus: the strings used to look up entries can be partitioned into parts that contribute to the selection of an entry and parts that are irrelevant - the irrelevant parts being variable. Which parts are which is impossible to determine. On creation of the database, it is known, however.
So, is it possible to make a query that returns the set of entries (or of keys) where the entries' key is a substring of the queried string?
All help is appreciated.
Thanks in advance. Please CC: to email, since the trafic of the newsgroup makes it easy to miss a reply otherwise.
-- Med venlig hilsen, James Avery <avery_at_wapmore.com>Received on Thu Feb 15 2001 - 01:36:04 CET