What does \ d in javascript regex do?

What does \dthis example do?

/Chapter (\d+)\.\d*/
+3
source share
3 answers

In what context?

In regular expression, it corresponds to the number (0-9).

Edit according to your comment:

It matches any line starting with a chapter, then digits, then a period, then a number of digits. As Chapter 1.0well as Chapter 12.01.

+7
source

In regular expression, this means the numbers 0-9

\dNumbers 0 through 9 /H\d/correspond to "H3"

+3
source

(match replace split)) /... /, , , 0-9. , , , .

+2
source

Source: https://habr.com/ru/post/1782343/


All Articles