You are right. It won't match 0. That's bad....

I wanted to exclude strings with leading zeros like "000123" with the `[1-9]`

Since javascript handles leading zeros correctly `/^\-?\d+$/` would be the better solution.