# Hyphen(-) is not matching using elasticsearch query

**URL:** https://discuss.elastic.co/t/hyphen-is-not-matching-using-elasticsearch-query/237668
**Category:** Elasticsearch
**Created:** [June 18, 2020, 3:29pm UTC](https://discuss.elastic.co/t/hyphen-is-not-matching-using-elasticsearch-query/237668 "2020-06-18T15:29:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![suresh123](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@suresh123](https://discuss.elastic.co/u/suresh123)
#### Post date: [June 18, 2020, 3:29pm UTC](https://discuss.elastic.co/t/hyphen-is-not-matching-using-elasticsearch-query/237668/1 "2020-06-18T15:29:05Z")

</div>

Hi Team,

Am trying to fetch data "/This is/my-query" am not able to fetch my-query.  
Hyphen is not matching .

Can you please provide elasticsearch regex patterns

Below is my query

{  
"query": {  
"regexp": {  
"request": {  
"value": "my-query"  
}  
}  
}  
}

Note: i tried with my'-'query and my\-query  
But none of them worked

---

<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 16, 2020, 3:29pm UTC](https://discuss.elastic.co/t/hyphen-is-not-matching-using-elasticsearch-query/237668/2 "2020-07-16T15:29:11Z")

</div>

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