# Help with custom analyzer/tokenizer

**URL:** <https://discuss.elastic.co/t/help-with-custom-analyzer-tokenizer/27333>\
**Category:** Elasticsearch\
**Created:** [August 13, 2015, 2:12pm UTC](https://discuss.elastic.co/t/help-with-custom-analyzer-tokenizer/27333 "2015-08-13T14:12:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [August 13, 2015, 2:12pm UTC](https://discuss.elastic.co/t/help-with-custom-analyzer-tokenizer/27333/1 "2015-08-13T14:12:53Z")

</div>

Hi - I have some strings in ES (I cant control the string format) , in the format A\_AValue\_B\_BValue\_N\_NValue

I'm trying to define an analyser to split them into A\_AValue, B\_BValue .. N\_NValue tokens .  
I have very little experience with custom analysers and have only used the pattern analyser before ... but as the pattern analyser defines the "separators" instead of the token patterns , I cant figure out how to accomplish this .

Any help?  
Thank you  
Pieter

---

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [August 13, 2015, 2:25pm UTC](https://discuss.elastic.co/t/help-with-custom-analyzer-tokenizer/27333/2 "2015-08-13T14:25:35Z")

</div>

OK - actually not a very difficult regex to put together _blush_

```
{
     "type": "pattern"
    ,"pattern":"_(?=._.*)"
}
```

---

<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:55pm UTC](https://discuss.elastic.co/t/help-with-custom-analyzer-tokenizer/27333/3 "2017-07-05T23:55:57Z")

</div>


