On 8/25/20 7:11 PM, John Hardin wrote:
> Does anybody know of a command-line (NOT interactive!) tool that will 
> generate a minimal "or" RE from a list of terms?
> 
> For example, given input like:
> 
>     17118720
>     17159892
>     17179275
>     17180740
>     17182828
> 
> ...it would generate:
> 
>     (?:171(?:18720|59892|79275|8(?:0740|2828)))
> 
> I don't want to reinvent the wheel... :)
> 
you can start from this perl one-liner:
https://cwiki.apache.org/confluence/display/SPAMASSASSIN/BayesStopList

 Giovanni

Reply via email to