syntax:
/ expression /
. : match any character other than newline
\s: match a whitespace character
\d: match number
\w: match alphanumeric character
^: beginning of the string
$: end of the string
\: escape character
quantifiers:
* : o or more times
+: 1 or more times
?: o or 1 time
{ n} : n times
{min, max}:
[abc]: a or b or c
regular expression is a RegExp object
how to use:
ex:
var key= /\d/;
if( key.test( "32") )
{
alert("matched");
}