{ITEM.VALUE}.regsub, substitute the item value

Received value:
MySQL crashed errno 123
Macro:
{{ITEM.VALUE}.regsub("^([A-Z]+).*([0-9]+)", " Problem ID: \1_\2 ")}
Output:
Problem ID: MySQL_123
Related:
https://regex101.com/
https://www.zabbix.com/documentation/3.4/manual/config/macros/macro_functions

First line as trigger name:
{{ITEM.VALUE}.regsub("((?m).*)", "\1")}

No comments: