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

trigger / calculated expression regexp dot escape possible regression

    XMLWordPrintable

Details

    • Incident report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 6.2.4
    • None
    • Server (S)
    • None

    Description

      Hello,

      I believe there is a regression with the regular expression syntax with something that I think used to work on 5.4 and no longer does on 6.4 when specifying the regular expression that matches the literal . (dot) character.

      As per regular expression traditional syntax, the . should be escaped with a \ backslash (otherwise it matches any character). But it doesn't seem to work. (A work around is to use [.], but well, the backslash syntax is still a regression)

       

      Steps to reproduce

      create a calculated item with one of the four different formulas:

      count(//agent.ping,#10,"regexp", "[.]")
      

      returns 0, as expected

      count(//agent.version,#10,"regexp", "[.]")
      

      returns 10, as expected

      count(//agent.version,#10,"regexp", "\\.")
      

      returns 0 <- this is not expected, it should be 10, such as previous test

      count(//agent.version,#10,"regexp", "\.")
      

      rejected by frontend,  which is expected behavior as per double escape rule

       

      two formulas rightfully work

      one formula is rightly rejected

      one formula produces the unexpected result

       

       

      Attachments

        Activity

          People

            zalex_ua Oleksii Zagorskyi
            rumo Marc Rumo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: