I am using this RegEx in an ASP.NET client-side validator:
\d{9}|A\d{8}|a\d{8}
And it successfully matches these strings (which is what I want):
123456789
a12345678
A12345678
But right now there is a somewhat duplicated section in the RegEx that I don’t like A\d{8}|a\d{8} — is there a more concise way of doing that?
Use regex pattern
[aA\d]\d{8}