# DSL query with string and numeric regex in Kibana

**URL:** <https://discuss.elastic.co/t/dsl-query-with-string-and-numeric-regex-in-kibana/256524>\
**Category:** Kibana\
**Created:** [November 24, 2020, 2:52pm UTC](https://discuss.elastic.co/t/dsl-query-with-string-and-numeric-regex-in-kibana/256524 "2020-11-24T14:52:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabh1991](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@saurabh1991](https://discuss.elastic.co/u/saurabh1991)\
**Post date:** [November 24, 2020, 2:52pm UTC](https://discuss.elastic.co/t/dsl-query-with-string-and-numeric-regex-in-kibana/256524/1 "2020-11-24T14:52:47Z")

</div>

I am not able to search for the following pattern in Kibana.  
`total-time: x.abcdef sec`

x value can be in range 0 to 99  
a b c d e f values can be in 0 to 9.

I tried using query\_string:

```auto
{
  "query": {
    "query_string": {
      "query": "total-time\\:\\ /[0-9]{2}\\.[0-9]{6}/",
      "fields": [
        "message"
      ]
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![tiagocosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagocosta/32/40045_2.png) [@tiagocosta](https://discuss.elastic.co/u/tiagocosta)\
**Post date:** [November 24, 2020, 5:05pm UTC](https://discuss.elastic.co/t/dsl-query-with-string-and-numeric-regex-in-kibana/256524/2 "2020-11-24T17:05:14Z")

</div>

@saurabh1991 are you using JSON for the request body?

Can we try the following:

`"query": "total-time\: /[0-9]{1,2}\.[0-9]{6}.*/",`

Cheers

---

<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:** [December 22, 2020, 5:05pm UTC](https://discuss.elastic.co/t/dsl-query-with-string-and-numeric-regex-in-kibana/256524/3 "2020-12-22T17:05:26Z")

</div>

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