[erlang-questions] searching in an ETS table for substring
Thu Feb 9 17:00:10 CET 2012
Thanks but where do you put this pattern?
On 2/9/2012 5:48 PM, Ulf Wiger wrote:
> If the key is a list (not a binary), you can use the pattern "foo" ++ '_'.
> There is no equivalent syntax for binaries.
> If the table is an ordered set, this search will be efficient, since it will use the bound prefix to narrow the search.
> On 9 Feb 2012, at 16:37, Martin Dimitrov wrote:
>> Is it possible to search in an ETS table for a key that starts with
>> certain characters?
>> Something equivalent to:
>> SELECT * FROM table WHERE name LIKE 'some%'
>> I read the documentation for select/2 and it says we can use as guards
>> functions as is_* and the like.
>> Best regards,
>> erlang-questions mailing list
More information about the erlang-questions