# RegEx engine improvements

**URL:** https://discourse.pi-hole.net/t/regex-engine-improvements/34751
**Category:** General
**Tags:** regex, v5-2
**Created:** [June 22, 2020, 7:44pm UTC](https://discourse.pi-hole.net/t/regex-engine-improvements/34751 "2020-06-22T19:44:35Z")
**Posts on this page:** 1
**Showing post:** 43

<div class="post-metadata">

### Author: ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)
#### Post date: [July 8, 2020, 6:56am UTC](https://discourse.pi-hole.net/t/regex-engine-improvements/34751/43 "2020-07-08T06:56:01Z")

</div>

I assumed the `invert` option only affected the `querytype`, but after doing some more tests, I must conclude it works as follows (correct me if I'm wrong).

regex from [this topic](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/36)

```auto
".*;querytype=A;invert

```

- pihole-FTL looks at the result of `pihole-FTL regex-test "google.be" ".*;querytype=A"`, **result** : `.*;querytype=A matches`
- pihole-FTL than **inverts** the result.

There appears to be no way to achieve what I wanted (hoped for), apply all rules (gravity, regex, ...) but only allow A queries for a specific device (with a single regex).

I totally misinterpreted the `invert` function, my mistake...

---

_[View the full topic](https://discourse.pi-hole.net/t/regex-engine-improvements/34751)._
