I want to do a match check, which checks that the string contains 5 or more characters that are neither the ñ, nor the z, nor the x. I have tried it in the following way:
b=s.matches("\w{5,}[A-z[^ñzx]][A-z[^ñzx]][A-z[^ñzx]][A-z[^ñzx]][A-z[^ñzx]]");
It does not work like this, I clarify that b
is a boolean
and s
is a String
captured on another line.