# Grok filter pattern file with capture group regex

**URL:** <https://discuss.elastic.co/t/grok-filter-pattern-file-with-capture-group-regex/96247>\
**Category:** Logstash\
**Created:** [August 8, 2017, 10:36am UTC](https://discuss.elastic.co/t/grok-filter-pattern-file-with-capture-group-regex/96247 "2017-08-08T10:36:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarlrmai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarlrmai/32/11574_2.png) [@jarlrmai](https://discuss.elastic.co/u/jarlrmai)\
**Post date:** [August 8, 2017, 10:36am UTC](https://discuss.elastic.co/t/grok-filter-pattern-file-with-capture-group-regex/96247/1 "2017-08-08T10:36:08Z")

</div>

```
\bSeverity=\\\"(?<severity>[^\\\"]*)

```

I have the above regex for Grok, It works on the Grok Debugger

```
[View@6876 Severity=\"INFO\" Module=

```

becomes

```
{
  "severity": [
    [
      "INFO"
    ]
  ]
}

```

How do I add this to a pattern file, I can;t seem to see the syntax for using a named capture group in a pattern file, and I can't get it working on the Grok Debugger.

---

<div class="post-metadata">

**Author:** ![jarlrmai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarlrmai/32/11574_2.png) [@jarlrmai](https://discuss.elastic.co/u/jarlrmai)\
**Post date:** [August 9, 2017, 6:23pm UTC](https://discuss.elastic.co/t/grok-filter-pattern-file-with-capture-group-regex/96247/2 "2017-08-09T18:23:06Z")

</div>

Can anyone help?

---

<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:** [September 6, 2017, 6:23pm UTC](https://discuss.elastic.co/t/grok-filter-pattern-file-with-capture-group-regex/96247/3 "2017-09-06T18:23:11Z")

</div>

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