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: