Zabbix Documentation 3.4

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:regular_expressions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
manual:regular_expressions [2017/12/18 09:16]
natalja.cernohajeva Item value preprocessing field added in the table "Regular expression support by location"
manual:regular_expressions [2018/03/14 11:01]
natalja.cernohajeva Important note completed with more useful links
Line 47: Line 47:
  
   ^TESTDATABASE$   ^TESTDATABASE$
- 
-Chosen //​Expression type//: "​Result is FALSE"​. Doesn'​t match name, containing string "//​TESTDATABASE//"​. 
  
 {{:​manual:​regular_expressions:​regexp_expr_2.png}} {{:​manual:​regular_expressions:​regexp_expr_2.png}}
 +
 +Chosen //​Expression type//: %%"​Result is FALSE"​%%. Doesn'​t match name, containing string "//​TESTDATABASE//"​.
 +
 +=== Example with an inline regex modifier ===
 +
 +Use of the following regular expression including an inline modifier (?i) to match the characters "​error":​
 +
 +  (?i)error
 +
 +{{:​manual:​regular_expressions:​regexp_expr_3a.png}}  ​
 +
 +Chosen //​Expression type//: %%"​Result is TRUE"​%%. Characters "​error"​ are matched. ​
 +
 +=== Another example with an inline regex modifier ===
 +
 +Use of the following regular expression including multiple inline modifiers to match the characters after a specific line:
 +  (?<​=match (?​i)everything(?​-i) after this line\n)(?​sx).*#​ we add s modifier to allow . match newline characters
 +
 +{{:​manual:​regular_expressions:​regexp_expr_4_new.png}}
 +
 +Chosen Expression type: %%"​Result is TRUE"​%%. Characters after a specific line are matched. ​
 +
 +<note important>​ **g** modifier can't be specified in line. The list of available modifiers can be found in [[https://​www.pcre.org/​original/​doc/​html/​pcresyntax.html#​SEC16|pcresyntax man page]]. For more information about PCRE syntax please refer to [[https://​www.pcre.org/​original/​doc/​html/​pcrepattern.html|PCRE HTML documentation]]. ​ </​note>​
  
 === More complex example === === More complex example ===
Line 122: Line 143:
 | ||||| | |||||
 ^Item value preprocessing^^^^^ ^Item value preprocessing^^^^^
-| ||Yes|No|**pattern** ​and **output** parameters|+| ||Yes|No|**pattern** ​parameter|
 | ||||| | |||||