# Regular expressions not working

**URL:** <https://discuss.elastic.co/t/regular-expressions-not-working/176043>\
**Category:** Kibana\
**Created:** [April 9, 2019, 2:17pm UTC](https://discuss.elastic.co/t/regular-expressions-not-working/176043 "2019-04-09T14:17:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mugen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mugen/32/16454_2.png) [@Mugen](https://discuss.elastic.co/u/Mugen)\
**Post date:** [April 9, 2019, 2:17pm UTC](https://discuss.elastic.co/t/regular-expressions-not-working/176043/1 "2019-04-09T14:17:39Z")

</div>

I've recently tested some Lucene querys from the documentation and somehow I can't get some of them to work. For example the regular expressions. I have a document with the field "artist" and the value "Queen" (Fieldtype = text). Somehow I can't get to write an expression which matches the value. I've tried the following queries without any luck:

```
artist:/Qu[e]{2}n/
artist:/Que{2}n/

```

Another Query that doesn't work is :

`_exists_:artist`

Am I doing something wrong ?

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [April 9, 2019, 8:26pm UTC](https://discuss.elastic.co/t/regular-expressions-not-working/176043/2 "2019-04-09T20:26:08Z")

</div>

Hello Lars,

It sounds like you may not have indexed on the artist field. The response [here](https://discuss.elastic.co/t/regex-search-in-kibana/97436) should help!

Regards,  
Aaron

---

<div class="post-metadata">

**Author:** ![Mugen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mugen/32/16454_2.png) [@Mugen](https://discuss.elastic.co/u/Mugen)\
**Post date:** [April 10, 2019, 7:13am UTC](https://discuss.elastic.co/t/regular-expressions-not-working/176043/3 "2019-04-10T07:13:05Z")

</div>

I ingested the Documents like this :

```auto
PUT my_index/_doc/_bulk
{ "index":{} }
{"album":"A Day at the Races","artist":"Queen","release":1976}
{ "index":{} }
{"album":"Out of the Blue","artist":"Electric Light Orchestra","release":1977}
{ "index":{} }
{"album":"More of the Hard Stuff","artist":"The Dubliners","release":1967}

```

Querrys like `album:*` or `album:"More of the Hard Stuff"` seem to work.

---

<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 8, 2019, 7:13am UTC](https://discuss.elastic.co/t/regular-expressions-not-working/176043/4 "2019-05-08T07:13:06Z")

</div>

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