# Problem with codec multiline

**URL:** <https://discuss.elastic.co/t/problem-with-codec-multiline/49525>\
**Category:** Logstash\
**Created:** [May 9, 2016, 7:51am UTC](https://discuss.elastic.co/t/problem-with-codec-multiline/49525 "2016-05-09T07:51:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessandro\_Colombo](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Alessandro\_Colombo](https://discuss.elastic.co/u/Alessandro_Colombo)\
**Post date:** [May 9, 2016, 7:51am UTC](https://discuss.elastic.co/t/problem-with-codec-multiline/49525/1 "2016-05-09T07:51:17Z")

</div>

Hi, I've a strange problem with a multiline codec that doesn't work as i expect.  
the same pattern work perfectly in a multiline filter.  
i've logstash 2.1.0

the log begins with this date: 05/06/2016 17:31:15.690 CEST  
the filter is: filter {  
if [type] == "XXXXX" {  
multiline {  
pattern =\> "^[0-9][0-9]/[0-9][0-9]/[0-9]{4}\s[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]{3}"  
negate =\> true  
what =\> "previous"  
}  
grok {  
XXXXX  
}  
etc...  
i've moved the same pattern in the inputs but it doesn't work.  
input {  
stdin {  
codec =\> multiline {  
pattern =\> "^[0-9][0-9]/[0-9][0-9]/[0-9]{4}\s[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]{3}"  
negate =\> "true"  
what =\> "previous"  
}  
}  
}  
the codec with this pattern work: pattern =\> "^\s"  
I've also tried to rewrite the pattern using grok patterns but also it doesn't work

Any suggest?

Alessandro

---

<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:** [July 6, 2017, 4:58am UTC](https://discuss.elastic.co/t/problem-with-codec-multiline/49525/2 "2017-07-06T04:58:36Z")

</div>


