# Regexp containing double quotes

**URL:** <https://discuss.elastic.co/t/regexp-containing-double-quotes/280662>\
**Category:** Elasticsearch\
**Created:** [August 6, 2021, 3:17pm UTC](https://discuss.elastic.co/t/regexp-containing-double-quotes/280662 "2021-08-06T15:17:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olaph](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@Olaph](https://discuss.elastic.co/u/Olaph)\
**Post date:** [August 6, 2021, 3:17pm UTC](https://discuss.elastic.co/t/regexp-containing-double-quotes/280662/1 "2021-08-06T15:17:11Z")

</div>

Hello,  
I am trying to search values that contains numbers or numbers in a quotes (no other character types except whitespaces). I was not able to use double-quotes character in character class. I have tried both

```auto
\" and \\\"

```

and no combination works.  
Is it possible? I the end, I would like to match 123, "123 ", 1 2 "3" etc.  
Thanks.

Does not match anything:

```auto
GET myindex/_search
{
  "query": {
    "regexp": {
      "search_query": {
        "value": "[\"]+"
       }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [August 7, 2021, 8:07am UTC](https://discuss.elastic.co/t/regexp-containing-double-quotes/280662/2 "2021-08-07T08:07:53Z")

</div>

It’s probably because you’re searching an indexed field that threw away the quotation characters?  
What does your index mapping look like for the field?

---

<div class="post-metadata">

**Author:** ![Olaph](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@Olaph](https://discuss.elastic.co/u/Olaph)\
**Post date:** [August 7, 2021, 7:12pm UTC](https://discuss.elastic.co/t/regexp-containing-double-quotes/280662/3 "2021-08-07T19:12:49Z")

</div>

Thank You so much Mark. I am ES beginner and was not aware of that.  
After few hours with mapping / indexing / DSL documentation, this really was the problem.  
There are filters applied to it.

---

<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:** [September 4, 2021, 7:13pm UTC](https://discuss.elastic.co/t/regexp-containing-double-quotes/280662/4 "2021-09-04T19:13:17Z")

</div>

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