# GROK | Problem ingest Pipeline | replace

**URL:** <https://discuss.elastic.co/t/grok-problem-ingest-pipeline-replace/294881>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [January 19, 2022, 10:52pm UTC](https://discuss.elastic.co/t/grok-problem-ingest-pipeline-replace/294881 "2022-01-19T22:52:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Walli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walli/32/100571_2.png) [@Walli](https://discuss.elastic.co/u/Walli)\
**Post date:** [January 19, 2022, 10:52pm UTC](https://discuss.elastic.co/t/grok-problem-ingest-pipeline-replace/294881/1 "2022-01-19T22:52:47Z")

</div>

Hello,  
I am new in the Commutiy and new in the topic GROK.  
I have a message where I want to replace a certain string. The problem the string contains the GROK meta character ^.  
The whole thing is supposed to happen in an ingest pipeline in the ES cluster.

Here is an example:

cat^@/etc/passwd^@|^@grep^@"Thomas"

This should become  
cat /etc/passwd | grep "Thomas"

So the ^@ should be replaced by a space.  
I have no idea how to do this.

Thanks for your time and help

Translated with [DeepL Translate: The world's most accurate translator](http://www.DeepL.com/Translator) (free version)

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [January 20, 2022, 12:59am UTC](https://discuss.elastic.co/t/grok-problem-ingest-pipeline-replace/294881/2 "2022-01-20T00:59:19Z")

</div>

Hi,

Try

```auto
{
  "description": "_description",
  "processors": [
    {
      "gsub" : {
        "field" : "yourField",
        "pattern" : "\\^@",
        "replacement": " "
      }
    }
  ]
}

```

---

<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:** [February 17, 2022, 1:00am UTC](https://discuss.elastic.co/t/grok-problem-ingest-pipeline-replace/294881/3 "2022-02-17T01:00:14Z")

</div>

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