How to use regex to match a string that could only contain 17 alphanumerical characters and does not contains the letter 'q' 'o' and 'i'. aka, only letters and numbers but not 'q' 'o' and 'i'.
Two conditions can be done in python separately:
- [a-z0-9]{17}
- [^qoi]
So except specifying valid character interval or putting two conditions together using AND is there any way more elegant in python that you can actually specify the character that you want to include while excluding the ones that you do not want as such
[a-z0-9&&[^qoi]]
in Java
(for example, there are 10 random letters that I want to exclude, it would be very tedious to specify each interval [a-bd-eh-ow-......]
If there is no such way, I have only to accept the reality of python regex as it is.
Appreciate your help! Erik