What does \d+ mean in regular expression terms?

前端 未结 4 1266
盖世英雄少女心
盖世英雄少女心 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条回答
  •  一个人的身影
    2021-01-31 02:14

    \d is called a character class and will match digits. It is equal to [0-9].

    + matches 1 or more occurrences of the character before.

    So \d+ means match 1 or more digits.

提交回复
热议问题