# Match special pattern

**URL:** <https://discuss.elastic.co/t/match-special-pattern/101463>\
**Category:** Elasticsearch\
**Created:** [September 22, 2017, 9:48am UTC](https://discuss.elastic.co/t/match-special-pattern/101463 "2017-09-22T09:48:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenny\_Hsiao](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jenny\_Hsiao](https://discuss.elastic.co/u/Jenny_Hsiao)\
**Post date:** [September 22, 2017, 9:48am UTC](https://discuss.elastic.co/t/match-special-pattern/101463/1 "2017-09-22T09:48:19Z")

</div>

I have a question about how to parse the pattern: "`h`String`(`4 digit numbers`)`"

- Start with `h`
- follow by `any string`
- `number` in `brackets`

I want to parse the brackets. Can some one help me to figure out the problem?  
`GET /_search { "query": { "regexp":{ "pattern": "h@\([0-9]{4}\)" } } }`

---

<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:** [October 20, 2017, 9:48am UTC](https://discuss.elastic.co/t/match-special-pattern/101463/2 "2017-10-20T09:48:20Z")

</div>

Closed on October 20, 2017, 9:48am UTC

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