Type Method (Deprecated)
Format new RegExp (pattern matching string, optional)
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. No QC2 code sample.
Sample code - QC 3 JavaScript
function (__string output) main ()
{var result = new Object();
var str="Drink Coffee";
var pattern=new RegExp("Drink Tea");
if (pattern.test(str)==true)
{
result.output = "Match found! "
}
else
{
result.output = "Match not found"
}
pattern.compile("Drink Coffee");
if (pattern.test(str)==true)
{
result.output = "Match found!"
}
else
{
result.output = "Match not found"
}
return result;
}