Javascript Reference
Categories: regular expression

javascript regular expression compile( )

@March 15, 2008, 1:22 a.m.
compile( )Firefox/Netscape/NN 4 IE 4 ECMA n/a  

compile("pattern"[, "g" | "i" | "gi"])

  

Compiles a regular expression pattern into a genuine regular expression object. This method is used primarily to recompile a regular expression with a pattern that may change during the execution of a script.

 
Parameters
 
  • Any regular expression pattern as a quoted string. Modifiers for global, ignore case, or both must be supplied as a separate quoted parameter.
 
Returned Value

Reference to a regular expression instance.


Powered by Linode.