-
Incident report
-
Resolution: Duplicate
-
Trivial
-
None
-
6.2.4
-
None
-
S2401
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
- duplicates
-
ZBX-21898 Add escaping of backslashes in history function parameters.
- Closed