Hello. Why regular season
var rep = /[^\*a-zA-Zа-яёА-ЯЁ0-9_-]/g; It works as it should, and regular
var rep = /[^a-zA-Zа-яёА-ЯЁ0-9_-\*]/g; Gives an error range out of order in character class? Same thing in php.
Hello. Why regular season
var rep = /[^\*a-zA-Zа-яёА-ЯЁ0-9_-]/g; It works as it should, and regular
var rep = /[^a-zA-Zа-яёА-ЯЁ0-9_-\*]/g; Gives an error range out of order in character class? Same thing in php.
Because the "-" indicates that a range of characters is used.
Accordingly, this design
_-\* interpreted as follows: select characters from "_" to "*"
Naturally, there is no definition of such a range, so an error is generated.
The "-" symbol is indicated at the end of the listing in order not to have to screen it.
For your case, the correct entry would be:
var rep = /[^a-zA-Zа-яёА-ЯЁ0-9_\-\*]/g; Source: https://ru.stackoverflow.com/questions/320007/
All Articles
_-*does not exist. - etki