Direct volume syntax
/pattern/attributes
Create RegExp Object syntax
New REGEXP (pattern, attributes)
1. Modifiers
I perform a match on case insensitive.
G performs a global match (finds all matches rather than stops after the first match is found).
M performs multi-line matching.
2. Square brackets are used to find characters in a range:
[ABC] find any character between square brackets
[^ABC] Find any characters that are not in square brackets
[0-9] Find any 0-9 number
[A-z] find any A-Z letter
(Red|blue|white) to find any of the specified options
3. Meta-Characters
\. Finds a single character, except line wrapping and line ending characters
\w Finding Word characters
\w Find non-word characters
\d Finding numeric characters
\d finding non-numeric characters
\s finding whitespace
\s Finding non-whitespace
\b Finding word boundaries
\b Matching non-word boundaries
4. quantifiers
5.javascript Regular Expressions