double-array trie match algorithm