From b1169b4e240b3318fa7feb2e9fac0170b14ea0b5 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Andr=C3=A9=20Malo?= Compare string1 with string2. If
@@ -514,11 +515,12 @@
then it is treated as a regular expression. Regular expressions are
implemented by the PCRE engine and
have the same syntax as those in perl
- 5.string1 = string2
+ string1 == string2
string1 != string2==
is just an alias for =
+ and behaves exactly the same way.
If you are matching positive (=
), you can capture
- grouped parts of the regular expression. The captured parts are
- stored in the special variables $1
..
+
If you are matching positive (=
or ==
), you
+ can capture grouped parts of the regular expression. The captured parts
+ are stored in the special variables $1
..
$9
.
@@ -566,6 +568,10 @@
<!--#if expr="($a = test1) && ($b = test2)" -->
The boolean operators &&
and ||
+ share the same priority. So if you want to bind such an operator more
+ tightly, you should use parentheses.
Anything that's not recognized as a variable or an operator
is treated as a string. Strings can also be quoted:
'string'
. Unquoted strings can't contain whitespace
@@ -578,6 +584,30 @@
and
'string1 string2'
results in string1 string2
.
If the expressions become more complex and slow down processing + significantly, you can try to optimize them according to the + evaluation rules:
+&&
and ||
)
+ are short circuited whereever possible. In conclusion with the rule
+ above that means, mod_include
evaluates at first
+ the left expression. If the left result if sufficient to determine
+ the end result, processing stops here. Otherwise it evaluates the
+ right side and computes the end result from both left and right
+ results.$1
.. $9
).If you want to look how a particular expression is handled, you can
+ recompile mod_include
using the
+ -DDEBUG_INCLUDE
compiler option. This inserts for every
+ parsed expression tokenizer information, the parse tree and how it is
+ evaluated into the output sent to the client.
string1 = string2
+ string1 == string2
string1 != string2
Compare string1 with string2. If @@ -481,11 +482,12 @@ then it is treated as a regular expression. Regular expressions are implemented by the PCRE engine and have the same syntax as those in perl - 5.
+ 5. Note that==
is just an alias for =
+ and behaves exactly the same way.
- If you are matching positive (=
), you can capture
- grouped parts of the regular expression. The captured parts are
- stored in the special variables $1
..
+
If you are matching positive (=
or ==
), you
+ can capture grouped parts of the regular expression. The captured parts
+ are stored in the special variables $1
..
$9
.
The boolean operators &&
and ||
+ share the same priority. So if you want to bind such an operator more
+ tightly, you should use parentheses.
Anything that's not recognized as a variable or an operator
is treated as a string. Strings can also be quoted:
'string'
. Unquoted strings can't contain whitespace
@@ -551,6 +557,30 @@
>string2' results in string1 string2
.
If the expressions become more complex and slow down processing + significantly, you can try to optimize them according to the + evaluation rules:
+&&
and ||
)
+ are short circuited whereever possible. In conclusion with the rule
+ above that means, $1
.. $9
).If you want to look how a particular expression is handled, you can
+ recompile -DDEBUG_INCLUDE
compiler option. This inserts for every
+ parsed expression tokenizer information, the parse tree and how it is
+ evaluated into the output sent to the client.