I'm looking for a regex with at the conditions:
- a) minimum 13 alphanumeric characters
- b) maximum 17 alphanumeric characters
- c) and at least 1 digit.
This regex fulfils a) and b). How can it fulfil also condition c)?
^[a-zA-Z0-9]{13,17}$
Example input texts:
# matching
123456789abcd
123456789abcdef
123456789abcdefg
# no match: too long
123456789abcdefgef
# no match: no digit
abcdefghijklmno
# no match: not alphanumeric only
123456789@abcdefg
The flavor is Java 8.