-
-
-
-
正则表达式的操作
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
正则表达式的操作
下表描述了使用正则表达式的运算符。正则表达式运算符在给定的默认语法表达式中执行的操作取决于表达式前缀是标识文本还是 HTTP 标头。评估标头的操作覆盖指定标头类型的所有实例的任何基于文本的操作。使用运算符时,请将替换为 <text> 要配置用于识别文本的默认语法表达式前缀。
正则表达式操作 | 说明 |
---|---|
<text>.BEFORE_REGEX(<regular expression>) | 选择与 <regular expression> 参数匹配的字符串前面的文本。如果正则表达式与目标中的任何数据不匹配,则表达式返回长度为 0 的文本对象。以下表达式从 “text/plain”. http.res.header(“content-type”).before_regex(re#/#) 中选择字符串“text”。 |
<text>.AFTER_REGEX(<regular expression>) | 选择与 <regular expression> 参数匹配的字符串后面的文本。如果正则表达式与目标中的任何文本不匹配,则表达式返回长度为 0 的文本对象。以下表达式从“myExample”中提取“Example”:http.req.header(“etag”).after_regex(re/my/) |
<text>.REGEX_SELECT(<regular expression>) | 选择与参数匹配的字符 <regular expression> 串。如果正则表达式与目标不匹配,则返回长度为 0 的文本对象。以下示例将从 Via 标头 http.req.header(“via”).regex_select(re!NS-CACHE-\d.\d:\s*\d{1,3}!) 中提取字符串“NS-CACHE-9.0: 90” |
<text>.REGEX_MATCH(<regular expression>) | 如果目标匹配 <regular expression> 最多为 1499 个字符的参数,则返回 TRUE。正则表达式必须采用以下格式:re <delimiter> 正则表达式< delimiter> 两个分隔符必须相同。此外,正则表达式必须符合 Perl 兼容 (PCRE) 正则表达式库语法。有关更多信息,请转到http://www.pcre.org/pcre.txt。特别是,请参阅 pcrepattern 手册页。但是,请注意以下事项:不允许向后引用。不推荐递归正则表达式。点元字符也匹配换行符。不支持 Unicode 字符集。SET_TEXT_MODE(IGNORECASE) 覆盖 (?i) 在正则表达式中指定的内部选项。以下是示例: http.req.hostname.regex_match(re/[[:alpha:]]+(abc){2,3}/) and http.req.url.set_text_mode(urlencoded).regex_match(re#(ab+c)#) 以下示例匹配 ab 和 ab:http.req.url.regex_match(re/a(?i)b/) The following example matches ab, aB, Ab and AB: http.req.url.set_text_mode(ignorecase).regex_match(re/ab/) 以下示例执行不区分大小写的多行匹配,其中点元字符也匹配换行符:http.req.body.regex_match(re/(?ixm) (^ab (.*) cd$) /) |
共享
共享
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.