I process a line with a construct:
this.value = this.value.replace(/[^\w]/ig, '');
I noticed that Cyrillic characters are not perceived as alphabetic in JavaScript, which differs from the behavior of \w , for example, for preg_replace in php .
UTF-8 page encoding.
Solution А-я works, but its flaw is (presumably) the need for each alphabet other than Latin to prescribe the appropriate range.
I ask you to suggest whether there is a possibility in js to trace letter characters in Cyrillic without the structure of the form А-я ? Is there a universal solution?
[a-zA-Z0-9_]- teran