# Replace static host list with regexp automatically

**URL:** https://discourse.pi-hole.net/t/replace-static-host-list-with-regexp-automatically/14539
**Category:** Duplicate
**Created:** [November 19, 2018, 10:36pm UTC](https://discourse.pi-hole.net/t/replace-static-host-list-with-regexp-automatically/14539 "2018-11-19T22:36:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oOo.Manu.oOo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/ooo.manu.ooo/32/5585_2.png) [@oOo.Manu.oOo](https://discourse.pi-hole.net/u/oOo.Manu.oOo)
#### Post date: [November 19, 2018, 10:36pm UTC](https://discourse.pi-hole.net/t/replace-static-host-list-with-regexp-automatically/14539/1 "2018-11-19T22:36:48Z")

</div>

Hi,

If I have understood correctly, this tool [GitHub - noprompt/frak: Transform collections of strings into regular expressions.](https://github.com/noprompt/frak) transforms collections of strings into regular expressions.

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

---

<div class="post-metadata">

### Author: ![oOo.Manu.oOo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/ooo.manu.ooo/32/5585_2.png) [@oOo.Manu.oOo](https://discourse.pi-hole.net/u/oOo.Manu.oOo)
#### Post date: [November 20, 2018, 1:27pm UTC](https://discourse.pi-hole.net/t/replace-static-host-list-with-regexp-automatically/14539/3 "2018-11-20T13:27:10Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 13, 2020, 11:00am UTC](https://discourse.pi-hole.net/t/replace-static-host-list-with-regexp-automatically/14539/5 "2020-06-13T11:00:35Z")

</div>

Closing in favor of

[https://discourse.pi-hole.net/t/reduce-size-gravity-list-with-active-wildcard-and-regex-entries/10698](https://discourse.pi-hole.net/t/reduce-size-gravity-list-with-active-wildcard-and-regex-entries/10698)

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 13, 2020, 11:00am UTC](https://discourse.pi-hole.net/t/replace-static-host-list-with-regexp-automatically/14539/6 "2020-06-13T11:00:38Z")

</div>


