Automatic regex builder

前端 未结 3 1328
误落风尘
误落风尘 2020-12-17 05:21

I have N strings. Also, there are K regular expressions, unknown to me. Each string is either matching one of the regular expressions, or it is garbage. There are total of

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 06:25

    The key words in academia are "grammatical inference". Unfortunately, there aren't any efficient, general algorithms to do the sort of thing you're proposing. What's your real problem?

    Edit: it sounds like you might be interested in Data Description Languages. PADS (http://www.padsproj.org/) is a typical example.

提交回复
热议问题