Double-Quoted Strings
"string"
A double-quoted string is interpreted via the usual rules in
programming languages for double quoted strings. The double-quote
character can be placed in a string by escaping it with a backslash.
Carriage returns and line-feeds can also be used via the usual \r
and
\n
syntax.
The main difference between the single and double quoted strings is
that the double quoted strings can be dynamically expanded. The syntax
${…}
is used for parse-time expansion and %{…}
is used for
run-time expansion. The difference between the two methods is that the
${…}
form is expanded when the server loads the configuration files
and is valid anywhere in the configuration files. The %{…}
form is
valid only in conditional expressions and attribute assignments and is
otherwise used verbatim.
The output of the dynamic expansion can be interpreted as a string, a number, or an IP address, depending on its context. In general, it is safest to assume that the result will be interpreted as a string.
Note that the language is not strongly typed, so the text "0000"
can be interpreted as a data type "integer", having value zero, or a
data type "string", having value "0000"
.
Examples:
"word"
"a string"
"this has embedded\ncharacters"