Quartz Composer JavaScript Reference © Cybero Designs  

global

TypeProperty (R)
Formatobject . Global
Commentary

Indicates the state of global match. Whether to test the regular expression against all possible matches in a string, or only against the first. You cannot change this property directly.
Sample code - QC 2 JavaScript
str = "RegExp Sample Text. String Match Test.";
reObj = new RegExp ( "S +", "g");
result = str.match (reObj);
outputs [0] = "number of matches" + result.length + ", GlobalFlag:" + reObj.global;
Sample code - QC 3 JavaScript
var str = "RegExp Sample Text. String Match Test.";
function (__string output) main ()
{
var result = new Object();
reObj = new RegExp("S+","g");
result = str.match(reObj);
result.output = "Number of matches"+result.length+"、GlobalFlag:"+reObj.global;
return result;
}

Return to the Start Page