# How to drop a message

**URL:** <https://discuss.elastic.co/t/how-to-drop-a-message/69548>\
**Category:** Logstash\
**Created:** [December 20, 2016, 10:01am UTC](https://discuss.elastic.co/t/how-to-drop-a-message/69548 "2016-12-20T10:01:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 20, 2016, 10:10am UTC](https://discuss.elastic.co/t/how-to-drop-a-message/69548/2 "2016-12-20T10:10:39Z")

</div>

The correct syntax is

```
if [message] =~ /^# Time:/ {

```

but otherwise it should work. Of course, none of the messages in your example begin with "# Time:".

---

_[View the full topic](https://discuss.elastic.co/t/how-to-drop-a-message/69548)._
