Merge several regexes to a single one

前端 未结 4 753
庸人自扰
庸人自扰 2021-01-12 14:15

I have several regexes (actually several thousands), and I must check if one string matches any of these regexes. It is not very efficient, so I would like to merge all thes

4条回答
  •  盖世英雄少女心
    2021-01-12 15:06

    I very much doubt it, on the grounds that any such tool would have to be very complex to deal with all the different ways in which a regex could be combined.

    If the regexes you have are relatively simple, such as in your examples, you may have some luck writing your own, however.

提交回复
热议问题