# Need help with key-value pair extraction

**URL:** <https://discuss.elastic.co/t/need-help-with-key-value-pair-extraction/226819>\
**Category:** Logstash\
**Created:** [April 7, 2020, 5:11am UTC](https://discuss.elastic.co/t/need-help-with-key-value-pair-extraction/226819 "2020-04-07T05:11:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nithani25](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nithani25/32/33457_2.png) [@Nithani25](https://discuss.elastic.co/u/Nithani25)\
**Post date:** [April 7, 2020, 5:11am UTC](https://discuss.elastic.co/t/need-help-with-key-value-pair-extraction/226819/1 "2020-04-07T05:11:42Z")

</div>

HI Team,  
I have split last field of my message has greedydata, however in some case, i have some key-value pair which needs extraction.

key-value format message:  
CurrentURL = /google/search , UserID = nishchen83

I want to extract CurrentURL & userid from such messages. Request help for grok for extracting this kv pair.

---

<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 7, 2020, 3:17pm UTC](https://discuss.elastic.co/t/need-help-with-key-value-pair-extraction/226819/2 "2020-04-07T15:17:51Z")

</div>

> [@Nithani25](#):
>
> Request help for grok for extracting this kv pair.

Use a [kv](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html) filter, not grok.

---

<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:** [May 5, 2020, 3:17pm UTC](https://discuss.elastic.co/t/need-help-with-key-value-pair-extraction/226819/3 "2020-05-05T15:17:52Z")

</div>

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