# KIbana Query: regexp of 10 numbers

**URL:** <https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650>\
**Category:** Kibana\
**Created:** [February 3, 2020, 3:36pm UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650 "2020-02-03T15:36:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndresL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andresl/32/54070_2.png) [@AndresL](https://discuss.elastic.co/u/AndresL)\
**Post date:** [February 3, 2020, 3:36pm UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650/1 "2020-02-03T15:36:48Z")

</div>

Im trying to match in a search (discovery tool):  
1234567890  
or  
123456-1234

Those expressions are not working (only catch 1 number)  
message: /[0-9]{10}/  
or  
message: /[0-9]{6}-[0-9]{4}/

It should find numbers like "1234567890" but it find this message:  
VerifyUserContactInformation with id 10, state Disabled

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [February 3, 2020, 7:42pm UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650/2 "2020-02-03T19:42:34Z")

</div>

Hey @AndresL, which version of Kibana are you using? I'm unable to replicate what you're seeing.

Also, if you click "Inspect", and open up the "Request" tab, would you mind replying with the request content?

 ![discover-regex](https://us1.discourse-cdn.com/elastic/original/3X/8/3/830e7dc1f4d0b52321b9c4a60962ade4344cdb6b.gif)

---

<div class="post-metadata">

**Author:** ![AndresL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andresl/32/54070_2.png) [@AndresL](https://discuss.elastic.co/u/AndresL)\
**Post date:** [February 3, 2020, 7:59pm UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650/3 "2020-02-03T19:59:29Z")

</div>

thanks for your awesome answer!

i see that you are using Lucene as query language, now is working.

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [February 3, 2020, 8:08pm UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650/4 "2020-02-03T20:08:39Z")

</div>

@AndresL, Yeah... KQL at the moment doesn't support RegEx, so you'll have to either use the Lucene syntax or you can add a filter and edit the Query DSL itself.

---

<div class="post-metadata">

**Author:** ![AndresL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andresl/32/54070_2.png) [@AndresL](https://discuss.elastic.co/u/AndresL)\
**Post date:** [February 5, 2020, 11:18am UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650/5 "2020-02-05T11:18:56Z")

</div>

Hi, sorry to bother @Brandon_Kobel  
but i cant see the way to search this on Lucene  
message: whatever 123456-1234  
i tried message: (/[0-9]{6}/-/[0-9]{4}/) (using - character space)  
but it match values like  
"2020"

---

<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:** [March 4, 2020, 11:19am UTC](https://discuss.elastic.co/t/kibana-query-regexp-of-10-numbers/217650/6 "2020-03-04T11:19:04Z")

</div>

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