Skip to content

Commit c77e834

Browse files
committed
refactor: Update regex patterns
Signed-off-by: lhhyung <lhhyung511@megazone.com>
1 parent 1d86283 commit c77e834

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugin/manager/event_manager/standard_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ def remove_alert_code_from_title(self, title: str) -> str:
139139
:return:
140140
"""
141141
try:
142-
title = regex.sub(r"\[(FIRING|RESOLVED):\d+\]\s", "", title)
142+
title = regex.sub(
143+
r"\[(FIRING|RESOLVED):(\d+),? ?(FIRING|RESOLVED)?:?(\d+)?\]", "", title
144+
)
143145
title = regex.sub(r"\[([a-zA-Z]+:\d+,\s*[a-zA-Z]+:\d+)\]\s", "", title)
144146
except Exception:
145147
ERROR_CONVERT_TITLE(title)

0 commit comments

Comments
 (0)