JavaScript RegExp \d Modifier
Definition and Usage
When the \d modifier is set the regular expression finds a single digitSyntax
/\d/ |
Example
In the following code we will do a global search for the digits:var str = "Give 100%"; var patt1 = /\d/g; |
The marked text below shows where the RegExp gets a match:
Give 100% |
JavaScript RegExp \d Modifier
Reviewed by 1000sourcecodes
on
21:53
Rating: