test, exec, match simple distinction
1, test
test return Boolean, find the corresponding string in the presence of mode. Var STR = "1a1b1c"; VAR reg = new RegExp ("1.", ""); alert (reg.test (STR)); / / true
2, exec
exec, and returns the current search results, and returns an array with. var STR ...