Code
^(?!0+$)\d{1,5}$
Results
Results as described by the header for the section.
** VALID **
1
12345
00001
01
10
** INVALID **
0
00000
123456
Explanation
^
Assert position at the start of the line(?!0+$)
Negative lookahead ensuring what follows is not0
one or more times, followed by the end of the line\d{1,5}
Any digit between 1 and 5 times$
Assert position at the end of the line