RegExp. Metacharacter
Definition and Usage
The meta character used to find a single character, except newline and line endings.
grammar
new RegExp("regexp.")
或者更简单方式:
/regexp./
或者更简单方式:
/regexp./
Browser Support
All major browsers support. Metacharacter
Examples
Examples
For string "ht" global search:
var str="That's hot!";
var patt1=/h.t/g;
var patt1=/h.t/g;
The marked text below shows where the expression gets a match
T hat 's hot !
try it"
JavaScript RegExp Object