<?xml version='1.0' encoding='UTF-8'?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="zh-CN" datatype="plaintext" original="manual/regular_expressions.md">
<trans-unit id="4151d28b" xml:space="preserve">
<source># 12 Regular expressions</source>
<target># 12. 正则表达式</target>
<trans-unit id="17ed5ab5" xml:space="preserve">
Expressions](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions)
(PCRE, PCRE2) are supported in Zabbix.
There are two ways of using regular expressions in Zabbix:
- manually entering a regular expression
- using a global regular expression created in Zabbix</source>
Zabbix支持 [Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions)(PCRE, PCRE2)。
- 使用在 Zabbix 中创建的全局正则表达式</target>
<trans-unit id="439895e1" xml:space="preserve">
<source>#### Regular expressions
You may manually enter a regular expression in supported places. Note
that the expression may not start with @ because that symbol is used in
Zabbix for referencing global regular expressions.
It's possible to run out of stack when using regular
expressions. See the [pcrestack man
page](http://pcre.org/original/doc/html/pcrestack.html) for more
Note that in multiline matching, the `^` and `$` anchors match at the
beginning/end of each line respectively, instead of the beginning/end of
See also examples for [correct escaping](/manual/appendix/escaping) in various contexts.</source>
<target state="needs-translation">#### 正则表达式
你可以在支持的位置手动输入正则表达式。注意,表达式可能不以 @ 开头,因为该符号在 Zabbix 中用于引用全局正则表达式。
使用正则表达式时可能会耗尽堆栈。有关更多信息,请参见 [pcrestack 帮助页](http://pcre.org/original/doc/html/pcrestack.html) 。
在多行匹配中,锚点 `^` 和 `$` 分别匹配每行的开头/结尾,而不是整个字符串的开头/结尾。</target>
<trans-unit id="e24754dc" xml:space="preserve">
<source>#### Global regular expressions
There is an advanced editor for creating and testing complex regular
expressions in Zabbix frontend.
Once a regular expression has been created this way, it can be used in
several places in the frontend by referring to its name, prefixed with
@, for example, *\@mycustomregexp*.
To create a global regular expression:
- Go to: *Administration → General*
- Select *Regular expressions* from the dropdown
- Click on *New regular expression*
The **Expressions** tab allows to set the regular expression name and

All mandatory input fields are marked with a red asterisk.
|Parameter|<|Description|
|-|----------|----------------------------------------|
|*Name*|<|Set the regular expression name. Any Unicode characters are allowed.|
|*Expressions*|<|Click on *Add* in the Expressions block to add a new subexpression.|
| |*Expression type*|Select expression type:<br>**Character string included** - match the substring<br>**Any character string included** - match any substring from a delimited list. The delimited list includes a comma (,), a dot (.) or a forward slash (/).<br>**Character string not included** - match any string except the substring<br>**Result is TRUE** - match the regular expression<br>**Result is FALSE** - do not match the regular expression|
|^|*Expression*|Enter substring/regular expression.|
|*Delimiter*|<|A comma (,), a dot (.) or a forward slash (/) to separate text strings in a regular expression. This parameter is active only when "*Any character string included*" expression type is selected.|
|*Case sensitive*|<|A checkbox to specify whether a regular expression is sensitive to capitalization of letters.|
A forward slash (/) in the expression is treated literally, rather than
a delimiter. This way it is possible to save expressions containing a