I want to validate a 5 digit number which should not be 00000. All numbers except 00000 are allowed.
examples : 01201 , 00001, 21436 , 45645 are valid numbers and 1,
You can use a negative look ahead:
^(?!0{5})\d{5}$
The negative loo ahead (?!...) will fail the whole regex if what's inside it matches, \d is a shortcut for [0-9].
(?!...)
\d
[0-9]