diff --git a/reflex_core/aws_rule_interface.py b/reflex_core/aws_rule_interface.py index 07f21d5..37379d4 100644 --- a/reflex_core/aws_rule_interface.py +++ b/reflex_core/aws_rule_interface.py @@ -320,9 +320,7 @@ def get_remediation_message_subject(self): str: The subject to use in notifications. """ subject = self.__class__.__name__ - subject_split = re.split( - "(?=(?<=[a-z])[A-Z])|(?=[A-Z](?=[a-z])|(?=^[A-Z]))", subject - ) + subject_split = re.findall(r"[A-Z](?:[a-z]+|[A-Z]*(?=[A-Z]|$))", subject) fixed_subject = " ".join(subject_split) return f"The Reflex Rule {fixed_subject} was triggered."