# Kv filter with spaces in values

**URL:** <https://discuss.elastic.co/t/kv-filter-with-spaces-in-values/227962>\
**Category:** Logstash\
**Created:** [April 14, 2020, 4:20pm UTC](https://discuss.elastic.co/t/kv-filter-with-spaces-in-values/227962 "2020-04-14T16:20:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [April 14, 2020, 4:44pm UTC](https://discuss.elastic.co/t/kv-filter-with-spaces-in-values/227962/3 "2020-04-14T16:44:57Z")

</div>

You could do that in a ruby filter by scaning the string for a regexp and then adding the key / value pairs to the event. Something like [this](https://discuss.elastic.co/t/how-to-split-the-one-field-into-multiple-fields-using-kv-plugins/172067/4).

---

_[View the full topic](https://discuss.elastic.co/t/kv-filter-with-spaces-in-values/227962)._
