[ZBXNEXT-1672] Trigger functions - regexp, str - number of matches Created: 2013 Mar 19  Updated: 2013 Mar 20

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Pavel Stros Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: count, regexps, trigger
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Would be useful to have an option to get the number of matches the regexp, iregexp or str evaluation function matches within a single item value (textual). The functions returns only a boolean value 1/0 (match/no match) currently. For backward compatibility I suggest to implement this as an optional third parameter of these functions.



 Comments   
Comment by Oleksii Zagorskyi [ 2013 Mar 20 ]

Probably existing count() function should cover all needs except "regexp" option.

Comment by Pavel Stros [ 2013 Mar 20 ]

I do not think so.
The count() funccions returs the NUMBER OF ITEMS that match.
The improved str() and regexp() functions would return the NUMBER OF MATCHES WITHIN A SINGLE ITEM VALUE (or multiple item values if the second parameter defines them).

Generated at Fri Apr 26 15:30:48 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.