# Change regexp filter to cidr filter

**URL:** <https://discuss.elastic.co/t/change-regexp-filter-to-cidr-filter/161538>\
**Category:** Logstash\
**Created:** [December 19, 2018, 2:11pm UTC](https://discuss.elastic.co/t/change-regexp-filter-to-cidr-filter/161538 "2018-12-19T14:11:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfesenko](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@dfesenko](https://discuss.elastic.co/u/dfesenko)\
**Post date:** [December 19, 2018, 2:11pm UTC](https://discuss.elastic.co/t/change-regexp-filter-to-cidr-filter/161538/1 "2018-12-19T14:11:28Z")

</div>

I have a configuration file for filtering documents from the specific IP-addresses. Also, it adds or changes some fields in the documents. This file uses regular expressions and `mutate` plugin. For input it uses `netflow` plugin. I want to transform this configuration file to be able to do the same using `cidr` plugin (without regular expressions). But when I do this, logstash misses a lot of documents it needs to process (say, with regexps I receive 40000 documents while using `cidr` I receive only 10000 documents). What can be the cause of such weird behavior?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 16, 2019, 2:11pm UTC](https://discuss.elastic.co/t/change-regexp-filter-to-cidr-filter/161538/2 "2019-01-16T14:11:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
