This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

Backslash: escape character

The backslash character \ is used in literal strings in action code to 'escape' the character. This is necessary where some characters have a special meaning. So a '(' can open a parenthesis in a text string, i.e. indicate to a human reader a side-note in brackets. But if that string is evaluate for regular expressions, both '(' and ')' have a special meaning and so must be escaped). Thus the literal text string:

"Do this (only) before that" 

if it will be evaluated for regular expressions, e.g. when used with String.contains(), might be seen written as:

$Text.contains("Do this \(only\) before that") 

These are also a few cases where (borrowing from regular expressions methods) escaped letters are used in general action code. The two most common are to indicate a line break or a tab character: