I have problem creating regex pattern to reject "0" value in String. I have tried to negate the string as follows
[^!(?0)]
but i believe this is wrong. Because it will also reject the String that contain zero, such as 10000". Is it possible to handle this with regex only? Because using if-else is easier though.
example:
- "0" - invalid
- "0000" - invalid
- "10" - valid
- "10000" - valid