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,
No need for negative lookahead
Live Demo
function isvalid5(str) { return str != "00000" && /^\d{5}$/.test(str); }