I need to allow following integers:
-1, 0, 1, 2, 3, 4 and so on
Here is the regex I was trying:
/^[-0-9]+$/gm
Here are the results:
-1 //true, its fine
-2 //true, should be false
- //true, should be false
How can I allow range from -1 to any +ve integer?
