Distance between regular expression

后端 未结 6 1266
春和景丽
春和景丽 2021-02-14 14:46

Can we compute a sort of distance between regular expressions ?

The idea is to mesure in which way two regular expression are similar.

6条回答
  •  無奈伤痛
    2021-02-14 15:04

    You can build deterministic finite-state machines for both regular expressions and compare the transitions. The difference of both transitions can then be used to measure the distance of these regular expressions.

提交回复
热议问题