what is a regular expression (Regular expreSSion)
A regular expression is an object that describes the character pattern.
Can handle more complex strings
Regular Expressions in JavaScript use the RegExp Object Representation
Regular expressions are used to match string patterns and retrieve replacements, and are powerful tools for performing pattern matching on strings.
How to use Regular Expressions in JavaScript
Grammar
var patt=new RegExp (pattern,modifiers)
Dynamic creation of regular expressions
var patt=/pattern/modifiers;
Parameters
Pattern ( pattern ) describes the mode of an expression
ModifierS ( modifier ) for specifying global matching, case-sensitive matching, and multiline matching
Common modifiers
Modifiers are used to perform case-sensitive and global matching
Square brackets
Square brackets are used to find characters in a range
Metacharacters
metacharacters ( Metacharacter) is a character that has a special meaning
Quantifiers
original link:http://www.maiziedu.com/wiki/js/regexp1/
A detailed description of the regular expression of JavaScript learning