Regular expression generator/reducer?

后端 未结 8 1066
感情败类
感情败类 2020-12-04 20:01

I was posed an interesting question from a colleague for an operational pain point we currently have, and am curious if there\'s anything out there (utility/library/algorith

8条回答
  •  [愿得一人]
    2020-12-04 20:52

    If you want to compare against all the strings in a set and only against those, use a trie, or compressed trie, or even better a directed acyclic word graph. The latter should be particularly efficient for URLs IMO.

    You would have to abandon regexps though.

提交回复
热议问题