\d Metacharacters can match non-numeric characters, equivalent to "[^0-9]". This article mainly introduces the regular expression \d meta-characters of the relevant information, the need for friends can refer to, hope to help everyone.
\d Metacharacters can match non-numeric characters, equivalent to "[^0-9]".
Syntax structure:
(1). Constructor method:
New RegExp ("\\d")
(2). Object Direct Volume:
/\d/
Browser support:
(1). This method is supported by IE browser.
(2). Firefox supports this method.
(3). Google Chrome supports this method.
(4). Opera browser supports this method.
(5). Safria Browser supports this method.
Instance code:
var str= "I love Antzone \ n and you"; var reg=new RegExp ("\\d", "G"); Console.log (Str.match (reg));
The above code can match all characters except the number.
var str= "I love Antzone \ n and you"; var reg=/\d/g;console.log (Str.match (reg));
This code works the same as the code above.