robert-bor / aho-corasick

Java implementation of the Aho-Corasick algorithm for efficient string matching
Apache License 2.0
890 stars 348 forks source link

Use this algorithm for url matching (strings) #58

Closed garimamannan closed 5 years ago

garimamannan commented 7 years ago

Can this algo be modified to accomplish URL pattern matching to return exact (best) match instead of first match? modify State.java to have String instead of Character and compare strings based on "/" tokenizer in a way that doesn't impact performance?

ghost commented 7 years ago

modify State.java to have String instead of Character and compare strings based on "/" tokenizer in a way that doesn't impact performance?

Have you tried making the change and profiling the difference?

ghost commented 5 years ago

Closing due to no answers to question.