# Replace processor does not allow replacement: "" anymore

**URL:** <https://discuss.elastic.co/t/replace-processor-does-not-allow-replacement-anymore/365664>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 28, 2024, 8:08am UTC](https://discuss.elastic.co/t/replace-processor-does-not-allow-replacement-anymore/365664 "2024-08-28T08:08:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeillons](https://avatars.discourse-cdn.com/v4/letter/z/57b2e6/32.png) [@Zeillons](https://discuss.elastic.co/u/Zeillons)\
**Post date:** [August 28, 2024, 8:08am UTC](https://discuss.elastic.co/t/replace-processor-does-not-allow-replacement-anymore/365664/1 "2024-08-28T08:08:36Z")

</div>

Hello,

It seems that starting from version 8.15, with the addition of the replace processor validation ([Add config check to replace processor by fearful-symmetry · Pull Request #40047 · elastic/beats · GitHub](https://github.com/elastic/beats/pull/40047)), it is no longer possible to use an empty replacement value when trying to remove a string, as shown below:

```auto
 - replace:
        fields:
        - field: "myfield"
          pattern: "-"
          replacement: ""

```

This behavior change is not mentioned in the release notes, and after reviewing the code, it doesn't appear to be intentional.

---

<div class="post-metadata">

**Author:** ![Trevor\_Blackford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trevor_blackford/32/120087_2.png) [@Trevor\_Blackford](https://discuss.elastic.co/u/Trevor_Blackford)\
**Post date:** [January 31, 2025, 2:31pm UTC](https://discuss.elastic.co/t/replace-processor-does-not-allow-replacement-anymore/365664/2 "2025-01-31T14:31:07Z")

</div>

It looks like this has been fixed!

> <https://github.com/elastic/beats/commit/a45a3ac2533d923e3bda5504c1612cdb79ce6921>
>
> The change in #40047 breaks the use of the replace processor to do
> s/\<pattern\>/…/ replacement. So make the validation on absence, not zero state.
