I need to write a regex to match number greater than or equal one. I have looked at this answer
Regex: ^(?:[2-9]|\d\d\d*)$
But, I do not get why there is ?:
before the number? Also, if the number in my case is in the middle of sentence, then I should remove the following ^( )$
from my regex?
EDIT:
I need grate than or equal 1 not just greater than. So I should use [1-9] instead of [2-9]?
EDIT2:
I need a regex to capture any number greater than or equal to the number 1
.
Example: 2,3,4, 11, 100, 31557600
or any number greater than that.