# Exclude lines starting hash not working

**URL:** <https://discuss.elastic.co/t/exclude-lines-starting-hash-not-working/47719>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 18, 2016, 10:14pm UTC](https://discuss.elastic.co/t/exclude-lines-starting-hash-not-working/47719 "2016-04-18T22:14:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bara](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bara](https://discuss.elastic.co/u/bara)\
**Post date:** [April 18, 2016, 10:14pm UTC](https://discuss.elastic.co/t/exclude-lines-starting-hash-not-working/47719/1 "2016-04-18T22:14:41Z")

</div>

I'm running filebeat on Windows (v1.2.1) and trying to get it to exclude lines starting with hashes. I believe I have configured it correctly but it still seems to send through lines beginning with hash to LogStash. I've tried with: ['^\#'] and ['^#'] but both fail to work. Is there something obvious I'm doing wrong?

```
filebeat:
  prospectors:
    -
      paths:
        - C:\inetpub\logs\LogFiles\W3SVC1\*.LOG
      input_type: log
      exclude_lines: ['^\#']
  registry_file: "C:/ProgramData/filebeat/registry"
output:
  logstash:
    hosts: ["logstash-server.test.local:5044"]
```

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [April 19, 2016, 7:56am UTC](https://discuss.elastic.co/t/exclude-lines-starting-hash-not-working/47719/2 "2016-04-19T07:56:58Z")

</div>

Could you try using "double quotes" instead of single quotes?

---

<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 5, 2017, 9:53pm UTC](https://discuss.elastic.co/t/exclude-lines-starting-hash-not-working/47719/3 "2017-07-05T21:53:03Z")

</div>


