Citrix Systems 9.2 Benutzerhandbuch

Seite von 302
168
Citrix NetScaler Policy Configuration and Reference Guide
http header.AFTER_
REGEX(regular expression)
Evaluates all instances of the header and extracts 
the text following the string that matches the 
regular expression argument in any instance of the 
header value. The header instances are matched 
from the last to the first.
The following example extracts "BBCCDD" from 
"AABBCCDD".
http.req.header("etag").after_
regex(re/AA/) 
http header.BEFORE_
REGEX(regular expression)
For any instance of the header, this operation 
returns the text that precedes the string matching 
the regular expression argument. The header 
instances are evaluated from the last to the first.
The following example extracts "text" from "text/
plain":
http.res.header("content-
type").before_regex(re#/#) 
http header.REGEX_
MATCH(regular expression)
This operation returns a Boolean TRUE if the 
regular expression argument matches any instance 
of the header value. The header instances are 
evaluated from the last to the first.
Following are examples:
http.req.hostname.regex_match(re/
[[:alpha:]]+(abc){2,3}/)
http.req.url.set_text_
mode(urlencoded).regex_
match(re#(a*b+c*)#)
The following example matches the strings “ab” 
and “aB”:
http.req.url.regex_match(re/a(?i)b/) 
The following example matches the strings “ab”, 
“aB”, “Ab”, and “AB”:
http.req.url.set_text_
mode(ignorecase).regex_match(re/ab/) 
The following example performs a case-
insensitive, multi-line match, where the dot (.) 
meta-character also matches a new line:
http.req.body.regex_match(re/(?ixm) 
(^ab (.*) cd$) /) 
Operations That Apply Regular Expressions to Text and HTTP Headers
Regular Expression Operation
Description