# Split string from one field from input to three or mutiple in output

**URL:** <https://discuss.elastic.co/t/split-string-from-one-field-from-input-to-three-or-mutiple-in-output/58343>\
**Category:** Logstash\
**Created:** [August 18, 2016, 12:16pm UTC](https://discuss.elastic.co/t/split-string-from-one-field-from-input-to-three-or-mutiple-in-output/58343 "2016-08-18T12:16:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lnx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lnx/32/48753_2.png) [@lnx](https://discuss.elastic.co/u/lnx)\
**Post date:** [August 18, 2016, 12:16pm UTC](https://discuss.elastic.co/t/split-string-from-one-field-from-input-to-three-or-mutiple-in-output/58343/1 "2016-08-18T12:16:47Z")

</div>

I'm battling to achieve something which in my mind should be simple.

I've got a string in a field from the input plugin like this:  
bigfield:"something - something1 - something2"

I need to grok or mutate it or something else by splitting on the "-" character so that I can send three fields to the output like this:  
field1:"something1"  
field2:"something2"  
field3"something3"

I've looked around for a similar problem, and perhaps I'm just describing it wrong - but I'm having no luck getting an answer for this.

Does anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [August 18, 2016, 2:08pm UTC](https://discuss.elastic.co/t/split-string-from-one-field-from-input-to-three-or-mutiple-in-output/58343/2 "2016-08-18T14:08:58Z")

</div>

Look at the [csv filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html).

It can use any separator characters not just commas - but not regular expressions.

---

<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:** [July 6, 2017, 4:42am UTC](https://discuss.elastic.co/t/split-string-from-one-field-from-input-to-three-or-mutiple-in-output/58343/3 "2017-07-06T04:42:49Z")

</div>

Closed on July 6, 2017, 4:42am UTC


