regexgen
一个可以从字符串生成正则表达式的工具,支持通过Trie数据结构优化正则表达式模式。
• Copy the embed code to showcase this product on your website
• Share on X to spread the word about this amazing tool
https://github.com/devongovett/regexgen使用例:```jsconst {Trie} = require('regexgen');let t = new Trie;t.add('foobar');t.add('foobaz');t.toRegExp(); // => /fooba[rz]/```