# Regular expression (non-English)

**URL:** <https://meta.discourse.org/t/regular-expression-non-english/63471>\
**Category:** Development\
**Created:** [27 Maggio 2017, 9:24am UTC](https://meta.discourse.org/t/regular-expression-non-english/63471 "2017-05-27T09:24:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [27 Maggio 2017, 9:24am UTC](https://meta.discourse.org/t/regular-expression-non-english/63471/1 "2017-05-27T09:24:57Z")

</div>

Continuation: [Tag search in tags dropdown box does not work for non-English characters](https://meta.discourse.org/t/tag-search-in-tags-dropdown-box-does-not-work-for-non-english-characters/53731)

file: discourse\_tagging.rb

```
- term.gsub!(/[^a-z0-9\.\-\_]*/, '')
+ term.gsub!(/[^a-z0-9а-я\.\-\_]*/, '')

```

All checks have failed

```
- term.gsub!(/[^a-z0-9\.\-\_]*/, '')
+ term.gsub!(/[^a-z0-9\p{Cyrillic}\.\-\_]*/, '')

```

[https://github.com/discourse/discourse/pull/4886](https://github.com/discourse/discourse/pull/4886)  
All checks have passed

- The construction: `а-я` is private (for the Russian language).
- The construction: `p{Cyrillic}` (Describes many cases)

All options work on localhost

If the construction: p{Cyrillic} - Is true (and it works fine on my site), then the same will be done in the file: search.rb in the search for tags.

`448 advanced_filter(/tags?:([a-zA-Z0-9,\-_]+)/) do |posts, match|`

What do you think about it?

---

_[View the full topic](https://meta.discourse.org/t/regular-expression-non-english/63471)._
