Match Spec
Vladimir Sekissov
svg@REDACTED
Thu Nov 20 10:09:13 CET 2003
Good day,
You can use erlang:match_spec_test/3. The only problem - match spec
is parsed every time in this BIF.
7> MS = ets:fun2ms(fun ({A, B}) -> A end).
[{{'$1','$2'},[],['$1']}]
8> erlang:match_spec_test([], MS, table).
{ok,false,[],[]}
9> erlang:match_spec_test({a, b}, MS, table).
{ok,a,[],[]}
mlogan> I could not remember if there was some "free standing" implementation of
mlogan> the match specs. I want to filter packets coming in off the wire with
mlogan> match spec syntax. Does anyone know if I can do this. I looked on the
mlogan> mailing list archives but did not see anything of the sort.
mlogan>
mlogan> Cheers,
mlogan> Martin
mlogan>
Best Regards,
Vladimir Sekissov
More information about the erlang-questions
mailing list