global
RegExp
instance propertyS2C Home
« Globals « RegExp « global
Description
Returns true
if global match flag set or false
otherwise.
Syntax
Signature | Description |
---|---|
aRegExp.global | Returns true if global match flag set or false otherwise. |
Parameters
None.
Examples
The code below displays the global
property of some RegExp
instances.
var aRegExp = /\d/;
var bRegExp = /\d/g;
var flagValues = new Array(2);
flagValues[0] = 'aRegExp global set: ' + aRegExp.global + '\n';
flagValues[1] = 'bRegExp global set: ' + bRegExp.global;
alert(flagValues);
Related Tutorials
JavaScript Intermediate Tutorials - Lesson 9 - Regular Expressions