I need a regex test that will test a field of 4 digits making sure at least one of the 4 digits is non-zero. Example:
abcd0000efgh - fail
abcd0001efgh - pass
abcd0010efgh - pass
abcd0100efgh - pass
abcd1000efgh - pass
abcd1234efgh - pass
abcd4321efgh - pass
Thanks
What flavor/language?
Here is the initial answer before having more information.
(?!0{4})\d{4}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With