Quartz Composer JavaScript Reference © Cybero Designs  

exec

Type Method
Format
var result1 = regexp.exec(str);
var result2 = regexp(str); //
Commentary

Regex (regular expressions) object. String pattern matching should be of most use.
(Unconfirmed)
Option "g" in the global match, "i" if it ignored the match in the case, m determine whether to match the line unit.
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 + "is";
Sample code - QC 3 JavaScript
function (__string output) main ()
{
var result = new Object();
var myRe = /ab*/g;
var str = "abbcdefabh";
var myArray;
while ((myArray = myRe.exec(str)) != null)
{
var msg = "Found " + myArray[0] + ". ";
}
result.output = msg += "Next match starts at " + myRe.lastIndex;
return result;
}

Return to the Start Page