# Drop lines when matching a word (multiline)

**URL:** <https://discuss.elastic.co/t/drop-lines-when-matching-a-word-multiline/115524>\
**Category:** Logstash\
**Created:** [January 15, 2018, 11:09am UTC](https://discuss.elastic.co/t/drop-lines-when-matching-a-word-multiline/115524 "2018-01-15T11:09:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cilzzz](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@cilzzz](https://discuss.elastic.co/u/cilzzz)\
**Post date:** [January 15, 2018, 11:09am UTC](https://discuss.elastic.co/t/drop-lines-when-matching-a-word-multiline/115524/1 "2018-01-15T11:09:04Z")

</div>

Hey

i have a log file i used the multiline filter to drop all the lines before the matched word

```
filter {
  multiline {
    type => "somefiletype"
    pattern => "\W*(Copy complete.)\W*"
    what => "previous"
  }
}

```

i want to drop all lines before the (Copy complete) also i want to drop the word itself  
how can i do this ?

thank you!

---

<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:** [February 12, 2018, 11:09am UTC](https://discuss.elastic.co/t/drop-lines-when-matching-a-word-multiline/115524/2 "2018-02-12T11:09:14Z")

</div>

Closed on February 12, 2018, 11:09am UTC

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