Microsoft® JScript RegExp Object |
Language Reference Version 3 |
Stores information on regular expression pattern searches.
RegExp.propertynameThe propertyname argument is one of the RegExp object properties.
The RegExp object cannot be created directly, but is always available for use. Its properties have undefined as their value until a successful regular expression search has been completed.The following example illustrates the use of the RegExp object:
function matchDemo() { var s; var re = new RegExp("d(b+)(d)","ig"); var str = "cdbBdbsbdbdz"; var arr = re.exec(str); s = "$1 contains: " + RegExp.$1 + "<BR>"; s += "$2 contains: " + RegExp.$2 + "<BR>"; s += "$3 contains: " + RegExp.$3; return(s); }