# When using the pattern, regular expressions do not work with Cyrillic

**URL:** <https://discuss.elastic.co/t/when-using-the-pattern-regular-expressions-do-not-work-with-cyrillic/177019>\
**Category:** Elasticsearch\
**Created:** [April 16, 2019, 8:04am UTC](https://discuss.elastic.co/t/when-using-the-pattern-regular-expressions-do-not-work-with-cyrillic/177019 "2019-04-16T08:04:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![f2f6661b1f32a0f914ea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f2f6661b1f32a0f914ea/32/44221_2.png) [@f2f6661b1f32a0f914ea](https://discuss.elastic.co/u/f2f6661b1f32a0f914ea)\
**Post date:** [April 16, 2019, 8:04am UTC](https://discuss.elastic.co/t/when-using-the-pattern-regular-expressions-do-not-work-with-cyrillic/177019/1 "2019-04-16T08:04:54Z")

</div>

When creating Tokenizers, I want to use the following pattern:  
@Tokenizers(tokenizers =\> tokenizers.Pattern("nuget-id-tokenizer", p =\> p.Pattern(@" **\wа-яА-Я+**"))  
But it doesn't work, although it works great in an online regular expression editor.  
This expression returns me spaces instead of words. Stack .net C#. What am I doing wrong?

---

<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:** [May 14, 2019, 8:05am UTC](https://discuss.elastic.co/t/when-using-the-pattern-regular-expressions-do-not-work-with-cyrillic/177019/2 "2019-05-14T08:05:12Z")

</div>

Closed on May 14, 2019, 8:05am UTC

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