Atleast one number in a string [RegEx]

1
I'm getting tired of google. I'm trying to find a simple RegEx to validate if a certain string contains atleast one numeric character and google isn't really helping. so what should it accept: '1', '12', '1A', '67AA' What should fail: 'AA', '' I use IsMatch('StringValue', regex). Can anyone help me with this simple RegEx
asked
2 answers
3
'.*[0-9].*'

'.' is any character '*' is zero times or more. [0-9] is a number

hint regexr

answered
0

What about this one? It means at least one character and any character before and after the number. Please test this carefully @ here before implementing.

IsMatch('StringValue', '^.+[0-9]\d*.+$')
answered