A value can be defined for certain match conditions and features. This value may consist of:
The manner in which special characters will be treated varies according to how a match condition or feature handles text values. A match condition or feature may interpret text in one of the following ways:
Text that is interpreted as a literal value will treat all special characters, with the exception of the % symbol, as a part of the value that must be matched. In other words, a literal match condition set to "\'*'\" will only be satisfied when that exact value (i.e., \'*'\) is found.
A percentage symbol is used to indicate URL encoding (e.g., %20).
Literal match conditions encompass all match conditions that do not support wildcards or regular expressions.
Text that is interpreted as a wildcard value will assign additional meaning to special characters. The following table describes how the following set of characters will be interpreted.
Character | Description |
---|---|
\ |
A backslash escapes any of the characters defined within this table. A backslash must be specified directly before the special character that should be escaped. For example, the following syntax escapes an asterisk: \*
|
% |
A percentage symbol is used to indicate URL encoding (e.g., %20). |
* |
An asterisk is a wildcard that represents zero or more characters. |
Space |
A space character indicates that a match condition may be satisfied by either of the specified values or patterns. |
'value' |
A single quote does not have special meaning. However, a set of single quotes is used to indicate that a value should be treated as a literal value. A literal value serves the following purposes:
Key information:
|
Regular expressions define a pattern that will be searched for within a text value. Regular expression notation defines specific meanings to a variety of symbols. The following table indicates how special characters are treated by match conditions and features that support regular expressions.
Match conditions and features that support regular expressions are only available with Rules Engine - Advanced Rules. For more information, please contact your CDN account manager.
This section solely highlights how regular expression match conditions and features handle "special characters." The information provided here is not meant to be a comprehensive guide on regular expression usage or syntax.
Special Character | Description |
---|---|
\ |
A backslash in a regular expression typically:
Match Conditions A single backslash is always ignored when defining a regular expression for a match condition. Please contact our customer support team if you would like to escape a special character when defining a regular expression for a match condition. Features A backslash is interpreted according to standard regular expression syntax. |
% |
The meaning of a percentage symbol depends on its usage.
|
* |
An asterisk allows the preceding character to be matched zero or more times. |
Space |
A space character is typically treated as a literal character. |
'value' |
Single quotes are treated as literal characters. A set of single quotes does not have special meaning. |
Edgecast CDN