# Strip in mutate filter

**URL:** <https://discuss.elastic.co/t/strip-in-mutate-filter/168167>\
**Category:** Logstash\
**Created:** [February 13, 2019, 9:02am UTC](https://discuss.elastic.co/t/strip-in-mutate-filter/168167 "2019-02-13T09:02:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [February 13, 2019, 9:02am UTC](https://discuss.elastic.co/t/strip-in-mutate-filter/168167/1 "2019-02-13T09:02:56Z")

</div>

I have a field in logstash

```auto
[user scp -t /apps/user]

```

I would like to extract the user by doing something similar to stripping off '[' in the string. I saw that the strip option just strips off spaces. So I wanted to know if there is an option to do what I want here. Thanks.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 13, 2019, 11:05am UTC](https://discuss.elastic.co/t/strip-in-mutate-filter/168167/2 "2019-02-13T11:05:38Z")

</div>

You could use either a grok or dissect filter to parse that field.

---

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [February 14, 2019, 7:20am UTC](https://discuss.elastic.co/t/strip-in-mutate-filter/168167/3 "2019-02-14T07:20:17Z")

</div>

Thank you for the suggestion.. It solved my issue.

---

<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:** [March 14, 2019, 7:20am UTC](https://discuss.elastic.co/t/strip-in-mutate-filter/168167/4 "2019-03-14T07:20:22Z")

</div>

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