# Query Kibana for strings WITHOUT commas?

**URL:** <https://discuss.elastic.co/t/query-kibana-for-strings-without-commas/340396>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language\
**Created:** [August 8, 2023, 6:52pm UTC](https://discuss.elastic.co/t/query-kibana-for-strings-without-commas/340396 "2023-08-08T18:52:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LogsandParsers](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@LogsandParsers](https://discuss.elastic.co/u/LogsandParsers)\
**Post date:** [August 8, 2023, 6:52pm UTC](https://discuss.elastic.co/t/query-kibana-for-strings-without-commas/340396/1 "2023-08-08T18:52:43Z")

</div>

Hi all,

I have a field on Kibana that has long text string values. Sometimes, these values contain commas and sometimes they do not. I want to search on Kibana for any of these values that DO NOT contain commas in the string. Nothing I am trying is working. How can search for only the values without commas?  
E.g.  
document 1:  
"message" =\> "hello hello 123"  
document 2:  
"message" =\> "hello, hello 123"

The query should only return document 2, because the message value contains a comma.

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [August 8, 2023, 7:22pm UTC](https://discuss.elastic.co/t/query-kibana-for-strings-without-commas/340396/2 "2023-08-08T19:22:25Z")

</div>

In Kibana, you can use the `NOT` operator combined with a `wildcard` query to find documents where a specific field does not contain a comma. Here's how you can do it:

1. Open the Kibana Discover interface.
2. In the search bar, use the following query:

```auto
NOT message:*,

```

Let me know if it works.

---

<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:** [September 5, 2023, 7:23pm UTC](https://discuss.elastic.co/t/query-kibana-for-strings-without-commas/340396/3 "2023-09-05T19:23:20Z")

</div>

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