I want to build a regex for a string that will contain 8 numeric characters[0-9] and 1 alphabetic character[a-z] means a total of 9 characters. The position of the alphabetical character and numeric characters can be any means numeric characters can come first like 12345678a
or alphabetical character can come at the start like a12345678
.
For above, I have tried below regex:
(([0-9]{8}[^.aeiou])|([^.aeiou][0-9]{8}))
But it's selecting a string which has more than 9 characters. I have tested it on regex & you can check it's screenshot below.
Can anyone please help me to solve it? Thanks for your time.