Regular expression javaScript

  1. as long as it is judged to be a number, and includes negative numbers, 0 does not include, find a regular expression, thank you
Jan.26,2022

^(\-)?([1-9])([0-9]*)$

  

/ -? [1-9] + /

Menu