Regex for just only numbers

后端 未结 3 576
既然无缘
既然无缘 2021-01-27 14:06

I haven\'t used regular expressions soo much, so I\'m having difficulty . I want regex that only validates that the field contains digits, but that does not care about how many.

3条回答
  •  野性不改
    2021-01-27 14:53

    Yes, this regex is perfectly valid and does what you think it does, although if your regex engine supports this you could use \d, whichs stands for [0-9].

提交回复
热议问题