/\w/u (Bugs)
Hello
Isn't it the wrong logic? If 'тест' matches against
/[^\w]/u
, wich means all alphanumeric chars and "_" (/[^\w]/
) in unicode range (u
), the test passes. Or am I wrong?
[^...] negates it. So it should match if there is at least one non alphanumeric character, shouldn't it?
Yes it should, I was wrong. But in the case of a negation of a class (like /\w/
or /\d/
for numbers) you can use /\W/
(/\D/
) as negator instead ^
.
Tschö, Auge
--
Trenne niemals Müll, denn er hat nur eine Silbe!