# Grok debugger works but logstash fails multiple lines

**URL:** <https://discuss.elastic.co/t/grok-debugger-works-but-logstash-fails-multiple-lines/254824>\
**Category:** Logstash\
**Created:** [November 9, 2020, 9:58pm UTC](https://discuss.elastic.co/t/grok-debugger-works-but-logstash-fails-multiple-lines/254824 "2020-11-09T21:58:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Fernando\_Palm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_fernando_palm/32/77804_2.png) [@Carlos\_Fernando\_Palm](https://discuss.elastic.co/u/Carlos_Fernando_Palm)\
**Post date:** [November 9, 2020, 9:58pm UTC](https://discuss.elastic.co/t/grok-debugger-works-but-logstash-fails-multiple-lines/254824/1 "2020-11-09T21:58:25Z")

</div>

Hello.  
I am trying to use the following regex to capture some info from a log entry:

```auto
(?m)(?<=responses=)(.*)(?=extraData)

```

Now it works in the grok debugger:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/8/48c1b83f945331d7226011c0723265ac09a6b36f.png)

But it fails in logstash:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21b73002ec2d0c9549ff1d1de30b1f971a30eeec.png)

Any idea why that might be the case?

Has it something to do with the use of the (?m) qualifier?

---

<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:** [December 7, 2020, 9:58pm UTC](https://discuss.elastic.co/t/grok-debugger-works-but-logstash-fails-multiple-lines/254824/2 "2020-12-07T21:58:32Z")

</div>

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