Special characters

Tosca Cloud considers { } [ ] * " as special characters.

If you want to use these characters, you have to let Tosca Cloud know to treat them as part of the text string. This is called "escaping".

Base rule

To escape a special character, put it between double quotation marks ".

You can escape characters one at a time, or you can escape the entire string.

Let's say you want to insert Tric*ntis as plain text into your application. So, the asterisk is part of the string and not a wildcard. In this case, you can use either Tric"*"ntis or "Tric*ntis".

Escape double quotation marks

If you want to use double quotation marks as part of a string, you need to escape twice:

  • Use double quotation marks to escape the special character ".

  • Add an additional leading double quotation mark to indicate that the subsequent " is the actual string and not the end of an escaped string.

You can escape one character at a time, or you can escape the entire string.

Let's say you want to insert {"ILoveMyTestcase"}. In this case, you need to enter "{""ILoveMyTestcase""}":

  • The " at the beginning and the end escapes the entire string, including the special characters {, }, and ".

  • The " tells Tosca Cloud to treat the subsequent " as a string.

Escape { and }

If a value contains { or } as part of a string, you need to escape them:

  • Use double quotation marks to escape the special character.

  • Add two additional double quotation marks: ""

You can escape the characters one at a time, or you can escape the entire string.

Let's say you want to use {Tosca} as the value of your variable. In this case, you can use either """{Tosca}""" or """{"""Tosca"""}""".