Answer the question
In order to leave comments, you need to log in
Why doesn't the regular expression work correctly?
There is such a routine.
\b^[1|3|5][a-zA-Z0-9][^O0]{3,10}\b
It checks a word for something that can only start with 1,3,5, can contain digits and letters except 0 and O with size from 3 to 10.
It works ALMOST correctly. The problem is that when you put on the second element after the numbers (1,3,5) ( 0 or O) it passes validation if you put in other places it will work as it should.
What could be the problem ?
Answer the question
In order to leave comments, you need to log in
So your second character can be 0 (zero) or O (letter O).
az and AZ this includes O and o.
0-9 enters 0 here, so it goes through.
\b^[1|3|5][a-zA-Z0-9[^O0]]{3,10}\b
Try like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question