Cybersecurity
DevOps Cloud
IT Operations Cloud
/** Return true or false based on a Regular Expression match
* @param {String} s1 the string to test
* @param {String} s2 the regex string to test it with
* @type Boolean
* @return a boolean true or false
*/
function matches(s1,s2)
{
// Build search and replace options.
var options = "";
var re = new RegExp(s2, options);
if (s1.match(re)) {
return true;
} else {
return false;
}
}
<do-set-local-variable name="trialtermstart">
<arg-string>
<token-replace-all regex="(\d\d\d\d)-(\d\d)-(\d\d)" replace-with="$1$2$3000000Z">
<token-xpath expression="$current-node/termBeginDt"/>
</token-replace-all>
</arg-string>
</do-set-local-variable>