[Kamailio-Users] lcr module prefix_mode=1

Juha Heinanen jh at tutpro.com
Sun Oct 12 17:02:26 CEST 2008


Alex Balashov writes:

 > What about some sort of hashing algorithm that operates on regular 
 > expression sums or is otherwise tuned by regex elements?

the problem is: given a string, find from set of prefixes the longest
one that matches the string.  if prefixes are known strings, they can be
organized in a data structure (tree, hash table, etc), where matching is
fast to execute.  

if prefixes are regular expressions, i don't know any other solution
than linearly match them one by one to string.

-- juha




More information about the sr-users mailing list