For substitution, the input is a string with embedded script. The embedded script is signalled by surrounding it with $:

  • There is no script here.

  • There is $ script $ here. — Evaluates script and replaces it within the string.

  • $ "There is " + script + " here." $ — This is equivalent. It's using + for concatenation of string literals.

  • This is a string without a $$ script — This is an example of embedding $ in a string without starting a script block.

    Scripts have identifiers, quoted strings, and numbers:

  • Identifiers must start with a letter or underscore and continue until the first non-letter, non-digit, non-underscore character:

    • Examples of identifiers are foo, _bar, and abc123.

    • Examples of illegal identifiers are 2b (it starts with a digit), foo-bar (it has an embedded hyphen).

  • Quoted strings start and end with the double quote character (“). To embed a double quote, use a backslash (\) before it. To embed a backward slash, use backward slash twice (\\):

    • "This is a typical string."

    • "This is a string with \" an embedded double quote."

    • "This is a string with \\ a backslash."

    • "This is " not a legal string."

      Whitespace in the script is ignored unless it is within a quoted string.

      Scripts may have function calls. A function call is an identifier followed by a set of zero or more comma-separated arguments. The arguments may be any valid expression. For example:

  • foo ()

  • foo ( "string 1", bar ( identifier1, identifier2 ) )

    For example, toUpper (E) would report the event's enterprise value string in upper case.


    The figure lists the substitution values that can be used in ECI configuration parameters.