type.inbound
and strings.contains(subject.base, '[')
and strings.ends_with(subject.base, ']')
and any(regex.extract(subject.base,
'\[(?P<first>.)(?P<second>.)\-(?P<second_part>[^\-]+)\-(?P<third_section>[^\]]+)\]$'
),
.named_groups["first"] == .named_groups["second"]
and regex.match(.named_groups["second_part"], '^\d+$')
and regex.contains(.named_groups["third_section"], '\d+$')
and strings.istarts_with(.named_groups["third_section"],
.named_groups["first"]
)
)
Playground
Test against your own EMLs or sample data.