Skip to content
Advertisement

regexp with russian lang

I can’t solve my problem with regexp.

Ok, when i type:

JavaScript

everything is ok, except situation with Russian language.

so, i try to re-type this reg-exp:

JavaScript

but this not working,

i know some idea, just write:

JavaScript

but this is crazy 😀

please, give me simple variant

Advertisement

Answer

Try a Unicode range:

JavaScript

Don’t forget the /u flag for Unicode.

In your case:

JavaScript

Note that the STAR in your regex is redundant. Everything already gets “eaten” by the PLUS. This would do the same:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement