I\'m currently using the pattern: \\b\\d+\\b, testing it with these entries:
\\b\\d+\\b
numb3r 2 3454 3.214 test
I only want it to catc
Try /^(?:-?[1-9]\d*$)|(?:^0)$/.
/^(?:-?[1-9]\d*$)|(?:^0)$/
It matches positive, negative numbers as well as zeros.
It doesn't match input like 00, -0, +0, -00, +00, 01.
00
-0
+0
-00
+00
01
Online testing available at http://rubular.com/r/FlnXVL6SOq