Regex for numbers only

后端 未结 18 2264
野性不改
野性不改 2020-11-22 03:29

I haven\'t used regular expressions at all, so I\'m having difficulty troubleshooting. I want the regex to match only when the contained string is all numbers; but with the

18条回答
  •  情深已故
    2020-11-22 04:20

    Sorry for ugly formatting. For any number of digits:

    [0-9]*
    

    For one or more digit:

    [0-9]+
    

提交回复
热议问题