Regular Expressions

For some sensors, you can use regular expressions to match a search pattern. PRTG will use standard regexp. In the following, we will provide examples for the most common patterns.

Common Search Patterns

Find matches containing the word error or alarm in any order:

\b(error|alarm)\b

 

Find matches containing the words error and alarm in any order:

(?=.*\berror\b)(?=.*\balarm\b).*

 

Find matches containing all of the words tree, flower, leaf, and bug, in any order:

(?=.*\btree\b)(?=.*\bflower\b)(?=.*\bleaf\b)(?=.*\bbug\b).*

 

Example

The search pattern

(?=.*\berror\b)(?=.*\balarm\b

would match the following lines:

  • alarm error
  • error alarm
  • I am an error and I evoke an alarm
  • I am an alarm and indicate an error
  • An alarm combined with an error indeed!
  • An error combined with an alarm, too!
     

More

Regex Tester: Test Regular expressions interactively

Wikipedia: Regular expression

Continue

Keywords:

Help
Need More Help?

Go to the Help Center.

  FEEDBACK Click here to send feedback to Paessler