# 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:** 5

<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:** [28 Maggio 2017, 4:57am UTC](https://meta.discourse.org/t/regular-expression-non-english/63471/5 "2017-05-28T04:57:23Z")

</div>

> [@gerhard](#):
>
> I think \p{Alnum} would be the right choice.

I checked: localhost - works (As well as: а-я, p{Cyrillic} …)  
But the test showed:

`term.gsub!(/[^a-z0-9\p{Alnum}\.\-\_]*/, '')`  
**All checks have failed**

Strangely (Although it already includes both letters and numbers)  
delete  
`- a-z0-9`

Can you make a correction yourself?  
This bug is initially there, and working with tags is an important part.

**P.S.** `term.gsub!(/[^\p{Alnum}\.\-\_]*/, '')` - working (All checks have passed)  
file: search.rb - does not need correction

---

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