# Grok Parse Help

**URL:** <https://discuss.elastic.co/t/grok-parse-help/248221>\
**Category:** Logstash\
**Created:** [September 10, 2020, 6:58pm UTC](https://discuss.elastic.co/t/grok-parse-help/248221 "2020-09-10T18:58:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [September 10, 2020, 6:58pm UTC](https://discuss.elastic.co/t/grok-parse-help/248221/1 "2020-09-10T18:58:19Z")

</div>

I am trying to pull one piece of information out of a field using grok. I've tried a couple different way and nothing seems to work. Nothing crashes at all, it's just that I don't see the new field that I am expecting to see.

This is an example field that I am trying to extract from:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/6/8618e6771be4207ea718e9020aa1734e339abfa3.png)

And here is my most recent code:

`grok { match => ["RCDTEXT", "sender_client_id\":\"(?<Client_ID>[0-9A-F]{7})"] }`

Note: I'm escaping the double quotes in the center, surrounding the colon.

Essentially, I need a new field called Client\_ID that contains a "word" that is always 3 letters followed by 4 numbers.

---

<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:** [September 10, 2020, 7:13pm UTC](https://discuss.elastic.co/t/grok-parse-help/248221/2 "2020-09-10T19:13:52Z")

</div>

> [@Jim\_Thunder](#):
>
> [0-9A-F]

Should that be [0-9A-Z] ?

---

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [September 10, 2020, 8:36pm UTC](https://discuss.elastic.co/t/grok-parse-help/248221/3 "2020-09-10T20:36:32Z")

</div>

Yes it should be. Ha, thanks. I changed it but that didn't change the issue. I still don't see the field I need.

---

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [September 11, 2020, 1:38pm UTC](https://discuss.elastic.co/t/grok-parse-help/248221/4 "2020-09-11T13:38:35Z")

</div>

Need to get rid of the escape slashes and replace the outer quotes with single quotes.

Like this:  
`grok { match => ["RCDTEXT", 'sender_client_id":"(?<Client_ID>[0-9A-Z]{7})'] }`

---

<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:** [October 9, 2020, 1:38pm UTC](https://discuss.elastic.co/t/grok-parse-help/248221/5 "2020-10-09T13:38:41Z")

</div>

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