# How to Edit logs with gork?

**URL:** <https://discuss.elastic.co/t/how-to-edit-logs-with-gork/213850>\
**Category:** Logstash\
**Created:** [January 6, 2020, 8:32am UTC](https://discuss.elastic.co/t/how-to-edit-logs-with-gork/213850 "2020-01-06T08:32:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coder\_HK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coder_hk/32/57814_2.png) [@Coder\_HK](https://discuss.elastic.co/u/Coder_HK)\
**Post date:** [January 6, 2020, 8:32am UTC](https://discuss.elastic.co/t/how-to-edit-logs-with-gork/213850/1 "2020-01-06T08:32:40Z")

</div>

I have a log winlog.evend\_data.RuleName : technique\_Id=T2343,techniqueName=asdfdasd

I want to change it to winlog.evend\_data.RuleName : technique\_Id : T4343 , techniquw\_name : asdfdasd

I just need the regular expression for this.  
NOTE: Please don't share useless links be specific .. I don't need generic solutions. And Don't post Gork tutorials videos etc

---

<div class="post-metadata">

**Author:** ![mancharagopan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mancharagopan/32/60266_2.png) [@mancharagopan](https://discuss.elastic.co/u/mancharagopan)\
**Post date:** [January 6, 2020, 9:23am UTC](https://discuss.elastic.co/t/how-to-edit-logs-with-gork/213850/2 "2020-01-06T09:23:53Z")

</div>

Try using gsub filter,

```auto
mutate {
    gsub => [
      # replace equals with a colon ":"
      "winlog.evend_data.RuleName", "[=]", ":"
    ]
  }

```

Assumes winlog.evend\_data.RuleName is a field name.

---

<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 3, 2020, 9:30am UTC](https://discuss.elastic.co/t/how-to-edit-logs-with-gork/213850/3 "2020-02-03T09:30:20Z")

</div>

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