Programmatically derive a regular expression from a string

前端 未结 4 1779
北恋
北恋 2021-01-02 23:14

I would like to input a string and return a regular expression that can be used to describe the string\'s structure. The regex will be used to find more strings of the same

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-02 23:24

    import just released a free tool to derive regex patterns from sets of example strings: "give it examples of data you want to pull out, and it will programmatically generate and test a regular expression."

    https://regexpgen.import.io/

    Its free but do need a login to use it.

    Disclaimer: I work at import.io (that's how i know this exists)

提交回复
热议问题