Item2211: IfDefinedPlugin: Nested quantifiers in regex
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Following code results in an error:
Nested quantifiers in regex
.
%IFDEFINED{"%VAR%" as="C++" then="true" else="false"}%
It seems, that only the 'as' part is sensitive to the letters '++'. We expect, that other regex like letter combination might result in errors too.
--
AndreLichtsteiner - 05 Oct 2009
Try
%IFDEFINED{"%VAR%" as="C\+\+" then="true" else="false"}%
The
as
parameter is used as a regular expression. Well and
+
is an iterator quantifier with
++
being an invalid expression.
Whenever possible: try to use %IF instead of %IFDEFINED. The former is much more capable and performing better as well.
To prevent to escape the double
+
try the %IF equivalent of that test:
%IF{"$VAR='C++'" then="true" else="false"}%
Basically this is not really an error of
IfDefinedPlugin, only an annoyance ... which is avoided best as outlined above.
--
MichaelDaum - 05 Oct 2009
Ciao Michael
The error occurs in an Wiki application organizing topics with tags and categories
The applications crashes with a tag named 'C++', we do not program the faulty line manually.
--
AndreLichtsteiner - 05 Oct 2009