# How to use regex function on kibana for Ordered Search / match multiple keyword(sentence)

**URL:** <https://discuss.elastic.co/t/how-to-use-regex-function-on-kibana-for-ordered-search-match-multiple-keyword-sentence/237452>\
**Category:** Kibana\
**Created:** [June 17, 2020, 10:34am UTC](https://discuss.elastic.co/t/how-to-use-regex-function-on-kibana-for-ordered-search-match-multiple-keyword-sentence/237452 "2020-06-17T10:34:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagmawan](https://avatars.discourse-cdn.com/v4/letter/n/d6d6ee/32.png) [@nagmawan](https://discuss.elastic.co/u/nagmawan)\
**Post date:** [June 17, 2020, 10:34am UTC](https://discuss.elastic.co/t/how-to-use-regex-function-on-kibana-for-ordered-search-match-multiple-keyword-sentence/237452/1 "2020-06-17T10:34:17Z")

</div>

Hi, Sorry i'm beginner in kibana. I will ask something about search, and will this work on kibana?

I want to use the regex function with the goal to order search / matching 2 sentences or maybe more in just 1 field.  
I have data like this :

> "DE:--GETRIEBE--R 63 B/4--66101----Elmo----0,18 KW  
> 0,25, HP  
> 1500 **RPM**  
> 380 V  
> 0,7A **Clase** B S43  
> 2.3.  
> 600:1  
> 1400 K----FALSE-----------------EN:---------------------------------------SP:------------MOTORREDUCTOR PARA LIMPIADOR RECOLECTOR DE POLVOS--R 63 B/4--66102----Elmo-------------------PT:------------------------"

And i use regex :

> Example : HP(.|\n)\*RPM(.|\n)\*Clase

With the Goal of finding 3 sentences (HP, RPM, Clase) in sequence, if they are not ordered there will be no results.  
I tried running it on the regex test builder and it worked, but when I used it on kibana search it didn't work.

 ![2020-06-16_19-11-38](https://us1.discourse-cdn.com/elastic/original/3X/d/f/df5a3f51aaf69607b5252a2d1e79809a175396c7.png)

Is there something wrong with this? or maybe someone missed? And does the case above work on Kibana Search?

Please help and I am grateful for that

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [June 17, 2020, 9:12pm UTC](https://discuss.elastic.co/t/how-to-use-regex-function-on-kibana-for-ordered-search-match-multiple-keyword-sentence/237452/2 "2020-06-17T21:12:03Z")

</div>

If you go to Discover and click "Add filter", then "Edit as Query DSL" you should be able to put the query there.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/2/f29ee771d0d94a2e9c1b002d4960f80d94a6159a.png)

---

<div class="post-metadata">

**Author:** ![nagmawan](https://avatars.discourse-cdn.com/v4/letter/n/d6d6ee/32.png) [@nagmawan](https://discuss.elastic.co/u/nagmawan)\
**Post date:** [June 18, 2020, 4:43am UTC](https://discuss.elastic.co/t/how-to-use-regex-function-on-kibana-for-ordered-search-match-multiple-keyword-sentence/237452/3 "2020-06-18T04:43:28Z")

</div>

HI @tylersmalley .

Sorry, I tried it but it doesn't work.

 ![2020-06-18_10-46-38](https://us1.discourse-cdn.com/elastic/original/3X/3/2/32cc904b8741a47236c6e00193b4f627d1d1b6cf.png)

I use the sentence "ANTRIEBSRIEMEN" to match the value

> "query": {  
> "regexp": {  
> "Fulltext\_\_c": {  
> "value": "ANTRIEBSRIEMEN.\*",  
> "flags" : "ALL"  
> }  
> }  
> }

Even though if we check for the available value :

 ![2020-06-18_11-28-09](https://us1.discourse-cdn.com/elastic/original/3X/e/a/ea0f40479d72f8dd1b37f415be8783b71b0593e8.png)

Is there still something missing? and are there any special adjustments to that?  
And for the example that you gave, it still only uses 1 sentence, does it work if you use 2 or more sentences?

> Example : New.\*York.\*xxxxx.\*xxxxx

---

<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:** [July 16, 2020, 4:43am UTC](https://discuss.elastic.co/t/how-to-use-regex-function-on-kibana-for-ordered-search-match-multiple-keyword-sentence/237452/4 "2020-07-16T04:43:32Z")

</div>

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