I am writing a program to match string with alpha numeric.I have tried on but could not find. please tell me regular expression for alphanumeric except o, O, I, i
i have tried many , but some times one character failing, i am new to regex
[A-HJ-NPR-Za-hj-npr-z0-9]$
My requirements are:
Q, O and I small and capitalYou can try this:
/[^\Wqoi]*/i
[^\W] is same as \w - will take all alphanumeric characters.. [^\Woi] is same as \w - [oi]
/i flag is for case-insensitivity.Since you don't want to match underscores, the correct regex would be:
/[^\Wqoi_]+/i
Since, \w also include _.
This should work:
/\b(?:(?![qoi_])\w)+\b/i
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With