# How to use regex query for filter in Kibana

**URL:** <https://discuss.elastic.co/t/how-to-use-regex-query-for-filter-in-kibana/172448>\
**Category:** Kibana\
**Created:** [March 15, 2019, 1:25am UTC](https://discuss.elastic.co/t/how-to-use-regex-query-for-filter-in-kibana/172448 "2019-03-15T01:25:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wrench\_turner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wrench_turner/32/42053_2.png) [@wrench\_turner](https://discuss.elastic.co/u/wrench_turner)\
**Post date:** [March 15, 2019, 1:25am UTC](https://discuss.elastic.co/t/how-to-use-regex-query-for-filter-in-kibana/172448/1 "2019-03-15T01:25:37Z")

</div>

Hello community! First post, new to Kibana.

I am trying to use a custom Query DSL to filter Kibana for a field called `extra.monitor_value_name` that contains the string `pH` at the front. The field is called `extra.monitor_value_name` . Examples of potential values are `Temperature_ABC01` , `DO_ABC01` , or `pH_ABC01` . The "pH" always comes first.

Kibana's Elasticsearch Query DSL does not seem to have a "contains string" so I think the best path forward is to use regex.

My current starting point is:  
{  
"query": {  
"regexp": {  
"extra.monitor\_value\_name": "pH.\*"  
}  
}  
}

However, this doesn't work, nothing comes up after this filter. What am I missing?

---

<div class="post-metadata">

**Author:** ![wrench\_turner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wrench_turner/32/42053_2.png) [@wrench\_turner](https://discuss.elastic.co/u/wrench_turner)\
**Post date:** [March 15, 2019, 9:00pm UTC](https://discuss.elastic.co/t/how-to-use-regex-query-for-filter-in-kibana/172448/2 "2019-03-15T21:00:37Z")

</div>

Well, my answer ended up being that I needed `extra.monitor_value_name.keyword`  
All syntax was correct!

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 22, 2019, 10:54am UTC](https://discuss.elastic.co/t/how-to-use-regex-query-for-filter-in-kibana/172448/3 "2019-03-22T10:54:41Z")

</div>


