JavaScript RegExp \D metacharacter
JavaScript RegExp Object
Definition and Usage
The \D metacharacter is used to find non-digit characters.
Syntax
new RegExp("\D")
Or a simpler way:
/\D/
Browser support





All major browsers support the \D metacharacter
Example
Example
Perform a global search for non-digit characters in the string:
var str="Give 100%!";
var patt1=/\D/g;
The text marked below shows where the expression found matches:
Give
100
%!
Try it »
JavaScript RegExp Object