# Hostname Regex Matching Problem

**URL:** <https://discuss.elastic.co/t/hostname-regex-matching-problem/228223>\
**Category:** Kibana\
**Created:** [April 16, 2020, 12:04am UTC](https://discuss.elastic.co/t/hostname-regex-matching-problem/228223 "2020-04-16T00:04:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leander](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@leander](https://discuss.elastic.co/u/leander)\
**Post date:** [April 16, 2020, 12:04am UTC](https://discuss.elastic.co/t/hostname-regex-matching-problem/228223/1 "2020-04-16T00:04:24Z")

</div>

I am trying to get a kibana filter to match a hostname using regex

Hostnames i am trying match eg.

[dpsp8091.domain.com](http://dpsp8091.domain.com)  
[dpsp8092.domain.com](http://dpsp8092.domain.com)

These examples are a few i have tried and failed with:  
Host: dpsp[8091 to 8092].domain.com  
Host: "dpsp[8091 to 8092].domain.com"  
Host: /dpsp\<8091-8092\>\*/  
Host: /dpsp[8091-8092].domain.com/

Any recommendations?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 16, 2020, 8:31am UTC](https://discuss.elastic.co/t/hostname-regex-matching-problem/228223/2 "2020-04-16T08:31:15Z")

</div>

The syntax should be `Host:/dpsp(8091|8092)]\.domain\.com/` (if your field is actually called "Host"). Make sure to set your query bar to lucene instead of KQL.

---

<div class="post-metadata">

**Author:** ![leander](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@leander](https://discuss.elastic.co/u/leander)\
**Post date:** [April 19, 2020, 11:24pm UTC](https://discuss.elastic.co/t/hostname-regex-matching-problem/228223/3 "2020-04-19T23:24:47Z")

</div>

Thanks!

i will give this a try.

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:** [May 17, 2020, 11:24pm UTC](https://discuss.elastic.co/t/hostname-regex-matching-problem/228223/4 "2020-05-17T23:24:49Z")

</div>

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