# Extract a string from a field: Grok Pattern

**URL:** <https://discuss.elastic.co/t/extract-a-string-from-a-field-grok-pattern/133698>\
**Category:** Logstash\
**Created:** [May 29, 2018, 2:31pm UTC](https://discuss.elastic.co/t/extract-a-string-from-a-field-grok-pattern/133698 "2018-05-29T14:31:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulnama](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@rahulnama](https://discuss.elastic.co/u/rahulnama)\
**Post date:** [May 29, 2018, 2:31pm UTC](https://discuss.elastic.co/t/extract-a-string-from-a-field-grok-pattern/133698/1 "2018-05-29T14:31:51Z")

</div>

Hello,

**INSERT INTO `Salesforce`(`ID`,`AccountName`) VALUES ('109','name)**

Now I need to extract Salesforce from the above log?

How should I do that.

Should I use the grok here.

I'm aware of (?Some Pattern)

What should be the pattern here as I should only extract Salesforce

Please suggest

Thanks for your time as always 🙂

---

<div class="post-metadata">

**Author:** ![rahulnama](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@rahulnama](https://discuss.elastic.co/u/rahulnama)\
**Post date:** [May 30, 2018, 8:28am UTC](https://discuss.elastic.co/t/extract-a-string-from-a-field-grok-pattern/133698/2 "2018-05-30T08:28:01Z")

</div>

can anyone please suggest.

Any help would be appreciated

---

<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:** [June 27, 2018, 8:28am UTC](https://discuss.elastic.co/t/extract-a-string-from-a-field-grok-pattern/133698/3 "2018-06-27T08:28:03Z")

</div>

Closed on June 27, 2018, 8:28am UTC

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