Regex implementation that can handle machine-generated regex's: *non-backtracking*, O(n)?

后端 未结 5 2101
暖寄归人
暖寄归人 2020-12-24 09:15

Edit 2: For a practical demonstration of why this remains important, look no further than stackoverflow\'s own regex-caused outage today (2016-07-2

5条回答
  •  攒了一身酷
    2020-12-24 09:56

    Where can I find robustly fast Regex implementation?

    You can't.

    Someone has to say it, the answer to this question given the restrictions is surely you can't - its unlikely you will find an implementation matching your constraints.

    Btw, I am sure you have already tried so, but have you compiled the regex (with the option that outputs to an assembly) - I say because:

    if you have a complex Regex and millions of short strings to test

提交回复
热议问题