JS.8 Regular Expression Object Functions

compile(pattern[, flags])

exec(str)

test(str)

A regular expression object contains the pattern of a regular expression. It has properties and methods for using the regular expression to find and replace matches in strings. A regular expression can be created as a literal:

re = /.*JavA.*/i;

Alternatively, it can be used to created using the RegExp constructor:

re = new RegExp('.*JavA.*', 'i');

A regular expression can be used in the String.match() or String.search() method to find the regular expression in a string, or evaluated against a string using one of the RegExp methods.

<< CALC.value(string) © 1996-2013 InetSoft Technology Corporation (v11.4) compile(pattern[, flags]) >>