Is there any Regex optimizer written in Java?

前端 未结 3 1390
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-23 09:46

I wrote a Java program which can generate a sequence of symbols, like \"abcdbcdefbcdbcdefg\". What I need is Regex optimizer, which can result \"a((bcd){2}ef)

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-23 10:22

    Regular expressions are not a substitute for compression

    Don't use a regular expression to represent a string constant. Regular expressions are designed to be used to match one of many strings. That's not what you're doing.

提交回复
热议问题