# Regex kibana

**URL:** <https://discuss.elastic.co/t/regex-kibana/287362>\
**Category:** Elasticsearch\
**Tags:** kql-kibana-query-language\
**Created:** [October 21, 2021, 8:14pm UTC](https://discuss.elastic.co/t/regex-kibana/287362 "2021-10-21T20:14:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehaltrivedi96](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@nehaltrivedi96](https://discuss.elastic.co/u/nehaltrivedi96)\
**Post date:** [October 21, 2021, 8:14pm UTC](https://discuss.elastic.co/t/regex-kibana/287362/1 "2021-10-21T20:14:31Z")

</div>

Hello,  
I am trying to create a regex query in kibana. I want to get a result which has sanitation followed by access meaning I am trying to find sanitation access\*. I am entering the following query but I am not getting any hits.

```auto
GET /manifestation_v1/_search
{
  "query": {
    "regexp": {
      "bibliographicInformation.title": {
        "value": "sanitation access*",
        "flags": "ALL"
      }
    }
  }
}

```

Can anyone help me out with regex?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 21, 2021, 9:02pm UTC](https://discuss.elastic.co/t/regex-kibana/287362/2 "2021-10-21T21:02:44Z")

</div>

Welcome!

It depends on the mapping.  
If you are using the default one, you should try against the field `bibliographicInformation.title.keyword`.

---

<div class="post-metadata">

**Author:** ![nehaltrivedi96](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@nehaltrivedi96](https://discuss.elastic.co/u/nehaltrivedi96)\
**Post date:** [October 22, 2021, 10:28am UTC](https://discuss.elastic.co/t/regex-kibana/287362/3 "2021-10-22T10:28:40Z")

</div>

I tried against it It doesn't match. The regex which I am writing is it correct? As I have a whitespace in between the 2 words.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 22, 2021, 11:46am UTC](https://discuss.elastic.co/t/regex-kibana/287362/4 "2021-10-22T11:46:06Z")

</div>

I'm not a regex person 😁 but if you would like someone to try your code you should provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can **copy and paste in Kibana dev console** , click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<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:** [November 19, 2021, 11:46am UTC](https://discuss.elastic.co/t/regex-kibana/287362/5 "2021-11-19T11:46:09Z")

</div>

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