非零正数或负数

非零正数,正则:

^+?[1-9][0-9]*$


非零负数,正则:

^-[1-9][0-9]*$

 
以上合并一起,正则:

^(-)?[1-9][0-9]*$
原文地址:https://www.cnblogs.com/insus/p/14205189.html