# How to wildcard filter?

**URL:** <https://discuss.elastic.co/t/how-to-wildcard-filter/160075>\
**Category:** Logstash\
**Created:** [December 10, 2018, 1:01am UTC](https://discuss.elastic.co/t/how-to-wildcard-filter/160075 "2018-12-10T01:01:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![teichae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teichae/32/82069_2.png) [@teichae](https://discuss.elastic.co/u/teichae)\
**Post date:** [December 10, 2018, 1:01am UTC](https://discuss.elastic.co/t/how-to-wildcard-filter/160075/1 "2018-12-10T01:01:57Z")

</div>

Hi. I have a question.

I want to use a filter using a wildcard in logstash.

/a.php /bphp /c.php /abc/abc.php /bcd/bcd.php

I would like to drop this part because such unwanted logs as above are being collected.

```
if "/*.php" in [request]{
Drop{}
}
use if "/*/*.php" in [request]{
Drop{}
}

```

The filter did not apply when specified in the above format.

What should I do?

---

<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:** [January 7, 2019, 1:02am UTC](https://discuss.elastic.co/t/how-to-wildcard-filter/160075/2 "2019-01-07T01:02:01Z")

</div>

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