This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

Quoting Regular Expressions

As action code syntax eclipses older syntaxes there is some scope for confusion where regular expressions are used. In the new v5.7+ 'dot' operators, e.g. String.contains(pattern), one of the options for the 'pattern' parameter is a regex which needs to be quoted - enclosed in double quotes. This conforms to a general rule of thumb that anything that is a string (literal, template name, regex, etc.) should be quoted. This helps Tinderbox to detect where the parameter is actually an expression.

The exception to this is the long standing AttributeName(pattern) operator originally introduced as part of the query language; with this do not quote your regular expression. Although still used by the query builder on Create/Rename dialogs, this operator should new be considered deprecated in favour of the $Attribute.contains(pattern) operator. Thus:

Old usage: $MyString(\W+) (now deprecated)

Current usage: $MyString.contains("\W+")


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Deprecated Usage : References to deprecated aspects of Tinderbox : Quoting Regular Expressions