A regular expression for at least one digit in a string looks like this:
(?=.*[0-9])
So that would find a1a
or a2a2
etc.
Suppose we wanted at least 2 digits in the string. So it should return true for a2a2
or a2a2a2
, but a2
would not pass.
What would that regex look like?