# Using KQL in Filters on Kibana to match strings that "ends with"

**URL:** https://discuss.elastic.co/t/using-kql-in-filters-on-kibana-to-match-strings-that-ends-with/336862
**Category:** Kibana
**Created:** [June 26, 2023, 4:14am UTC](https://discuss.elastic.co/t/using-kql-in-filters-on-kibana-to-match-strings-that-ends-with/336862 "2023-06-26T04:14:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kashif\_shamaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kashif_shamaz/32/122703_2.png) [@kashif\_shamaz](https://discuss.elastic.co/u/kashif_shamaz)
#### Post date: [June 26, 2023, 4:14am UTC](https://discuss.elastic.co/t/using-kql-in-filters-on-kibana-to-match-strings-that-ends-with/336862/1 "2023-06-26T04:14:40Z")

</div>

Hi there,

I have an indexed field called "uri\_path", on this field, I have following values:

```auto
- /something/*/
- /something/*/a/
- /something/*/b/
- /something/*/c/

```

The \* indicates anything, and I want to create a search query such that I filter documents where the `uri_path` field strictly matches `/something/*/` and not the other 3 paths

I am unable to find a way to create the search query except doing a lot of `NOT ...` in the search query. Is there no other way to do this in Kibana at the moment?

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [June 26, 2023, 6:17am UTC](https://discuss.elastic.co/t/using-kql-in-filters-on-kibana-to-match-strings-that-ends-with/336862/2 "2023-06-26T06:17:04Z")

</div>

Hi @kashif_shamaz, unfortunately I think this is the only available solution.

---

<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 24, 2023, 6:18am UTC](https://discuss.elastic.co/t/using-kql-in-filters-on-kibana-to-match-strings-that-ends-with/336862/3 "2023-07-24T06:18:01Z")

</div>

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