# How to drop a block of lines in logstash filter?

**URL:** <https://discuss.elastic.co/t/how-to-drop-a-block-of-lines-in-logstash-filter/276053>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 15, 2021, 8:29pm UTC](https://discuss.elastic.co/t/how-to-drop-a-block-of-lines-in-logstash-filter/276053 "2021-06-15T20:29:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patr123](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Patr123](https://discuss.elastic.co/u/Patr123)\
**Post date:** [June 15, 2021, 8:29pm UTC](https://discuss.elastic.co/t/how-to-drop-a-block-of-lines-in-logstash-filter/276053/1 "2021-06-15T20:29:50Z")

</div>

I have these lines in my websphere Systemout.log file:

```auto
************Start Display Current Environment************
line 1
line 2
line 3
line 4
line 5
line 7
*************End Display Current Environment*************

```

How can I match the block of this start and end pattern and drop all the lines in between including the start and end line?

---

<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 13, 2021, 10:30pm UTC](https://discuss.elastic.co/t/how-to-drop-a-block-of-lines-in-logstash-filter/276053/2 "2021-07-13T22:30:49Z")

</div>

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