expression expression
Regular-expression pattern element. Optional in <rule>
elements.
Attributes section-fd0574eee1f9423cbb2ed709c0906800
None.
Data section-4cd740c511a1432da0955e9acfbcf96f
Regular-expression pattern string.
Description section-3245c8a531bb455d8398449f6ea63b37
The <expression>
element can be empty or contain a simple search string or a regular-expression pattern. The pattern is applied to the entire request string.
A match always occurs when <expression>
is empty or not specified; this is equivalent to specifying <expression>.*</expression>
.
The implementation is based on the Java package java.util.regex, which provides a regular-expression syntax similar to Perl’s.
Note section-6b41a900b0ce4a9590e5861e3c81599c
The expression string must not contain literal < and & characters. These reserved characters can be encoded with &
and <
, respectively, or the entire string can be enclosed in an XML CDATA
section:
<expression><![CDATA[&fmt=custom]]></expression>
All characters between the <expression>
and </expression>
tags are passed to the regular expression parser, including characters outside the optional CDATA
section. Care should be taken to avoid extra whitespace.