Syntax with modifiers:
new RegExp("\\d", "g")
Example 1: This example searches the digits in the whole string.
Example 2: This example searches the digits in the whole string.
Supported Browsers: The browsers supported by RegExp \d Metacharacter are listed below:
- Google Chrome
- Apple Safari
- Mozilla Firefox
- Internet Explorer