What does \d+ mean in regular expression terms?

前端 未结 4 1207
盖世英雄少女心
盖世英雄少女心 2021-01-31 01:52

I\'m new to regular expressions and came accros the following \\d+ . I do not exactly know what this means, please point me in the right direction.

4条回答
  •  旧时难觅i
    2021-01-31 02:33

    \d is a digit (a character in the range 0-9), and + means 1 or more times. So, \d+ is 1 or more digits.

    This is about as simple as regular expressions get. You should try reading up on regular expressions a little bit more. Google has a lot of results for regular expression tutorial, for instance. Or you could try using a tool like the free Regex Coach that will let you enter a regular expression and sample text, then indicate what (if anything) matches the regex.

提交回复
热议问题