# Delete API (ES ver1.7) by regexp

**URL:** <https://discuss.elastic.co/t/delete-api-es-ver1-7-by-regexp/37224>\
**Category:** Elasticsearch\
**Created:** [December 15, 2015, 9:51am UTC](https://discuss.elastic.co/t/delete-api-es-ver1-7-by-regexp/37224 "2015-12-15T09:51:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgsg](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sgsg](https://discuss.elastic.co/u/sgsg)\
**Post date:** [December 15, 2015, 9:51am UTC](https://discuss.elastic.co/t/delete-api-es-ver1-7-by-regexp/37224/1 "2015-12-15T09:51:49Z")

</div>

Hi,  
I'm trying to delete one part of documents in an index by using regexp api but I can't.

The command is as follows.  
curl -XDELETE '[http://localhost:9200/index/type/\_query](http://localhost:9200/index/type/_query)' -d '{"query":{"regexp":{"\_id":"#document\_tag"}}}'

I use ES ver 1.7

I wonder if "\_query" is not available.  
Is there way to delete?

Thank You and Best Regards.

---

<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 5, 2017, 11:30pm UTC](https://discuss.elastic.co/t/delete-api-es-ver1-7-by-regexp/37224/2 "2017-07-05T23:30:59Z")

</div>


