# Elasticsearch regexp for all fields

**URL:** <https://discuss.elastic.co/t/elasticsearch-regexp-for-all-fields/281237>\
**Category:** Elasticsearch\
**Created:** [August 12, 2021, 5:26pm UTC](https://discuss.elastic.co/t/elasticsearch-regexp-for-all-fields/281237 "2021-08-12T17:26:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChinigamiHunter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chinigamihunter/32/92850_2.png) [@ChinigamiHunter](https://discuss.elastic.co/u/ChinigamiHunter)\
**Post date:** [August 12, 2021, 5:26pm UTC](https://discuss.elastic.co/t/elasticsearch-regexp-for-all-fields/281237/1 "2021-08-12T17:26:02Z")

</div>

I need to write query to find regexp match any fields.

i write a regexp match one field (laravel).

```auto
$params = [
                'index' => 'index',
                'type' => '_doc',
                'body' => [
                    "query"=> [
                        "nested"=> [
                          "path"=> "Event",
                          "query"=> [
                            "bool"=> [
                              "must"=> [
                                [ 
                                  "regexp"=> [ 
                                    "Event.name"=> $request["sear"] 
                                  ]
                                ]
                              ]
                            ]
                          ]
                        ]
                    ]
                ]
            ];

```

i want to replace Event.name with all fields how can i do that

---

<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 9, 2021, 5:26pm UTC](https://discuss.elastic.co/t/elasticsearch-regexp-for-all-fields/281237/2 "2021-09-09T17:26:06Z")

</div>

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