[ZBX-25098] Macro function regsub wrong result for "\@" parameter Created: 2024 Aug 22  Updated: 2024 Nov 19  Resolved: 2024 Sep 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 6.0.35rc1, 7.0.5rc1, 7.2.0alpha1

Type: Problem report Priority: Trivial
Reporter: Sergejs Boidenko Assignee: Sergejs Boidenko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team B
Sprint: Prev.Sprint, S24-W36/37
Story Points: 0.5

 Description   

Steps to reproduce:

Create macro function 

{{ITEM.VALUE}.regsub(1, "\@")}

where ITEM.VALUE = 1

Result:
empty string

Expected:

"\@"

FE shows correctly



 Comments   
Comment by Alexander Vladishev [ 2024 Aug 23 ]

I am unable to reproduce this problem. Which version of Zabbix are you using? What version of the PCRE library?

I tried to reproduce this on the latest Zabbix 7.0 with the library libpcre2-8-0 version 10.37-0ubuntu2.

UPD: I was able to reproduce it. I missed a backslash in the regular expression.

Comment by Sergejs Boidenko [ 2024 Sep 26 ]

Fixed in:

Generated at Fri May 23 08:31:12 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.