# Remove common keyword from a filed value

**URL:** <https://discuss.elastic.co/t/remove-common-keyword-from-a-filed-value/107159>\
**Category:** Logstash\
**Created:** [November 10, 2017, 9:14am UTC](https://discuss.elastic.co/t/remove-common-keyword-from-a-filed-value/107159 "2017-11-10T09:14:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharu85](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tharu85](https://discuss.elastic.co/u/tharu85)\
**Post date:** [November 10, 2017, 9:14am UTC](https://discuss.elastic.co/t/remove-common-keyword-from-a-filed-value/107159/1 "2017-11-10T09:14:33Z")

</div>

After I have apply the filter, I received output like below

```
command_set ="CmdAV=show ip policy <cr>"

```

But I need a output like below.

```
command_set ="show ip policy"

```

For the filed **command\_set** , **CmdAV=** is common and I need to remove **CmdAV=** keyword from the filed value.

I have tried gsub and it removed all word followed by the keypair.

Are there Any other method to resolve this

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 14, 2017, 8:09pm UTC](https://discuss.elastic.co/t/remove-common-keyword-from-a-filed-value/107159/2 "2017-11-14T20:09:10Z")

</div>

gsub is the right option but it sounds like you misconfigured it.

---

<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:** [December 12, 2017, 8:09pm UTC](https://discuss.elastic.co/t/remove-common-keyword-from-a-filed-value/107159/3 "2017-12-12T20:09:13Z")

</div>

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