sadullah zolfqar
sadullah zolfqar

Reputation: 210

Javascript regex include only uppercase A-Z, 0-9 characters but not include 'I' and 'O'

Regex should accept only A-Z, 0-9 characters, but not inlcude I, O and should be 10 characters long.

How can I fix this regex I wrote that does not contain I and O.

^[A-Z-0-9]{10}$

Upvotes: 1

Views: 191

Answers (1)

L. Scott Johnson
L. Scott Johnson

Reputation: 4402

Make ranges that skip I and O:

^[A-HJ-NP-Z0-9]{10}$

Upvotes: 3

Related Questions