# Elastic Search cant find the results from Regex pattern

**URL:** <https://discuss.elastic.co/t/elastic-search-cant-find-the-results-from-regex-pattern/289049>\
**Category:** Kibana\
**Created:** [November 12, 2021, 7:00am UTC](https://discuss.elastic.co/t/elastic-search-cant-find-the-results-from-regex-pattern/289049 "2021-11-12T07:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishabhtryroll](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rishabhtryroll](https://discuss.elastic.co/u/rishabhtryroll)\
**Post date:** [November 12, 2021, 7:00am UTC](https://discuss.elastic.co/t/elastic-search-cant-find-the-results-from-regex-pattern/289049/1 "2021-11-12T07:00:58Z")

</div>

I am searching a particular regex pattern in the discover tab through KQL and Lucence but I got the

error `Expected ":", "<", "<=", ">", ">=", AND, OR, end of input, whitespace but "\" found. log:"api.mydomain.com" AND ' \s5..\s' ----------------------------^`

Here is the query I want to search **log: "[api.mydomain.com](http://api.mydomain.com)" AND ' \s5..\s'**

How to do that?

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [December 7, 2021, 9:51am UTC](https://discuss.elastic.co/t/elastic-search-cant-find-the-results-from-regex-pattern/289049/2 "2021-12-07T09:51:32Z")

</div>

Hi @rishabhtryroll,  
KQL doesn't support regular expresions. Have you tried with Lucene?[https://github.com/elastic/kibana/issues/46855](https://github.com/elastic/kibana/issues/46855)

---

<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:** [January 4, 2022, 9:51am UTC](https://discuss.elastic.co/t/elastic-search-cant-find-the-results-from-regex-pattern/289049/3 "2022-01-04T09:51:51Z")

</div>

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