From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript RegExp \D Metacharacter


RegExp Object Reference JavaScript RegExp Object

Definition and Usage

The \D metacharacter is used to find a non-digit character.

Syntax

new RegExp("\D")

or simply:

/\D/


Example

Example

Do a global search for non-digit characters:

var str="Give 100%!";
var patt1=/\D/g;

The marked text below shows where the expression gets a match:

Give 100%!

Try it yourself »


RegExp Object Reference JavaScript RegExp Object

From http://www.w3schools.com (Copyright Refsnes Data)