Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18474

Regex patterns used within macros could have unexpected results (Template Module Windows Services)

    XMLWordPrintable

Details

    • Team INT
    • Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021)
    • 1

    Description

      Steps to reproduce:

      1. Configuration -> Templates -> Template Module Windows Services -> Macros
      2. View definition for {$SERVICE.NAME.NOT_MATCHES} macro

      Result:
      I believe the intent of the regular expression is "Match any of the following strings as long as they take up the entire line/string".

      However, the anchors (^$) bind tighter than the alternation (|), so the "start of string" anchor only binds to the first service name, and the "end of string" anchor only binds to the last service name. Surely this isn't what's intended. 

      Expected:

      ^(?:service1|service2|service3)$

      Attachments

        Activity

          People

            abiba Andrew Biba
            Matthew.Steeves2 Matthew Steeves
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: