# Add a filter in Visualize with regexp

**URL:** <https://discuss.elastic.co/t/add-a-filter-in-visualize-with-regexp/103567>\
**Category:** Kibana\
**Created:** [October 11, 2017, 2:30pm UTC](https://discuss.elastic.co/t/add-a-filter-in-visualize-with-regexp/103567 "2017-10-11T14:30:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeenon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zeenon/32/24883_2.png) [@zeenon](https://discuss.elastic.co/u/zeenon)\
**Post date:** [October 11, 2017, 2:30pm UTC](https://discuss.elastic.co/t/add-a-filter-in-visualize-with-regexp/103567/1 "2017-10-11T14:30:50Z")

</div>

Hi,  
In metrics, I want to add a filter  
"myhost" like "^localhost.\*$"  
I have a scroll list with: is, is not, is one of, ... butno is like  
I try with Query DSL but it is not working, surely dur to a bad syntax  
Is it possible, how to process ?  
thanks for your tips,

---

<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:** [October 11, 2017, 3:59pm UTC](https://discuss.elastic.co/t/add-a-filter-in-visualize-with-regexp/103567/2 "2017-10-11T15:59:24Z")

</div>

Hello,  
Are you trying to filter for all hosts that start with "localhost" ?  
If so, you can add this in the search bar: `myhost:localhost*`  
And if you want to do it from the filter bar you can set it to `is` and then add the wildcard to the string in the text box: `localhost*`

---

<div class="post-metadata">

**Author:** ![zeenon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zeenon/32/24883_2.png) [@zeenon](https://discuss.elastic.co/u/zeenon)\
**Post date:** [October 12, 2017, 7:49am UTC](https://discuss.elastic.co/t/add-a-filter-in-visualize-with-regexp/103567/3 "2017-10-12T07:49:22Z")

</div>

thanks for your answer, 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:** [November 9, 2017, 7:49am UTC](https://discuss.elastic.co/t/add-a-filter-in-visualize-with-regexp/103567/4 "2017-11-09T07:49:37Z")

</div>

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