The error in your expression (provided that your description of what you need is correct) is that you will only match two-digit numbers (you give in {1} after both your number expressions) or zero. The syntax is correct, and you will get a match if the number is negative, and it has two digits

Try this regular expression:

'(^[-][1-9]+[\d]*$)|(^0$)'

Matches:

a minus sign

characters 1 to 9, one or more times (a + indicates that one or more hits are allowed)

a digit, 0 or more times (a * indicates that zero or more hits are allowed)

or just a zero.

A null value will not match the expression.