# "match\_pattern": "regex" problem

**URL:** <https://discuss.elastic.co/t/match-pattern-regex-problem/77385>\
**Category:** Elasticsearch\
**Created:** [March 4, 2017, 10:39am UTC](https://discuss.elastic.co/t/match-pattern-regex-problem/77385 "2017-03-04T10:39:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkspace](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkspace](https://discuss.elastic.co/u/dkspace)\
**Post date:** [March 4, 2017, 10:39am UTC](https://discuss.elastic.co/t/match-pattern-regex-problem/77385/1 "2017-03-04T10:39:52Z")

</div>

Could you help me why not working my regexp "match\_pattern": "regex", for "count" but next one for "ID" is working.  
el 5.2.0

"mappings" : {  
"_default_" : {  
"\_all" : {"enabled" : true, "omit\_norms" : true},  
"dynamic\_templates" : [  
{  
"count" : {  
"match\_pattern": "regex",  
"match" : "[A-Z]\*",  
"unmatch" : "ID|Name|ip",  
"mapping" : {  
"type" : "float", "index" : "not\_analyzed"  
}  
}  
},  
{  
"ID" : {  
"match" : "ID",  
"mapping" : {  
"type" : "string", "index" : "not\_analyzed"  
}  
}  
},

---

<div class="post-metadata">

**Author:** ![dkspace](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkspace](https://discuss.elastic.co/u/dkspace)\
**Post date:** [March 7, 2017, 8:31pm UTC](https://discuss.elastic.co/t/match-pattern-regex-problem/77385/2 "2017-03-07T20:31:46Z")

</div>

somebody use "match\_pattern": "regex" ?

---

<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:** [April 4, 2017, 8:31pm UTC](https://discuss.elastic.co/t/match-pattern-regex-problem/77385/3 "2017-04-04T20:31:48Z")

</div>

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