Replace static host list with regexp automatically



If I have understood correctly, this tool transforms collections of strings into regular expressions.

That would be awful to have this function implemented in order to reduce the size of blacklist.


Regex is slower then gravity.list (blocklist is hashed) and this is discussed on several occasions.

When adding to Blackist, not blocklist, you have choice to have is just straight on the blacklist or have it converted to a wildcard or go for the full Regex power if you know how.

I run one every import to gravity.list a filter that removes domains from that list because they are already covered in Regex. Thanks to an mmotti I also automaticly filter out domains that have more than 20 subdomains in the gravity.list and are put in the Regex file.

More then twenty is the point were Regex is faster then a hashed gravity.list file.


Slower, yes, but it is easier to block using regexp as you may not be aware about all the existing hostname to block.

gravity uses much more memory also (I am using Pi one), regexp allows blocking more with less :slight_smile:


I have added a part to my earlier reply that covers that part.

Earlier discussions: