^/$ is not allowed in (configured) regular expressions

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Minor
    • 2.3.2
    • Affects Version/s: 2.0.0
    • Component/s: Frontend (F)
    • Environment:
      Zabbix 2.0.0
      Debian Squeeze

      When configuring a regular expression to limit the set of allowed file systems during an item discovery I figured out that "/" in the regular expression causes problem.

      To reproduce this effect create a regular expression of

      ^/$

      and set it to

      Result is TRUE

      When trying to save the Zabbix frontend shows an error on the top:

      preg_match(): Unknown modifier '$' [include/forms.inc.php:1753]

      Apparently the "/" ends the regular expression and the "$" is considered a modifier to the expression.

      The current workaround is to use ^\/$ instead of ^/$ (escaping the slash).
      I would prefer though if the escaping would happen automatically.

            Assignee:
            Unassigned
            Reporter:
            Christoph Haas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: