(1)
String Lookup:
Search (' a ');//Find location
SUBSTRING (starting point, end point);//not including the end position
Chartat (3);//Take Out third place
Split ('-')//by-slicing
Match ();//Put all matching, all up.
replace;//replaces all matches, returns the replaced string
(2)
RegExp Object
JS Style: var re = new RegExp (a);
Prel style: var re =/a/;
(3)
Ignore case: i/a/i
Global match: G/\d/g
^ Beginning of the line
$ End of line
^$
Quantifiers:
Several: +/\d+/
{n}: occurs exactly n times
{n,m}: At least n times, up to M times
{N,}: At least n times, Maximum unlimited
?: {0,1}
*:{0,}
(4)
Escape:
\d: Digital
.: arbitrary string
\w: English, numerals, underline
\s: whitespace characters
\d: Non-digital
\w: Non-English, numerals, underline
\s: Non-blank
Metacharacters
[abc]//from ABC to pick a
[0-9]//0 to 9
[^a-z]//except A to Z
Verify Mailbox
Re = ^/\w+ @ [0-9a-z]+ \. [a-z]+/i$
Re.test (str), or//a part that meets the requirements returns true, non-conforming returns false,
JavaScript Regular Expressions