type.inbound
and any(filter(attachments,
.file_type == "ics"
or (
.file_extension == "ics"
or .content_type in ("application/ics", "text/calendar")
)
),
regex.count(file.parse_text(.).text, '[\x{E0020}-\x{E007E}]') > 10
and (
regex.contains(file.parse_text(.).text,
'[A-Za-z0-9][\x{E0020}-\x{E007E}]+[A-Za-z0-9]'
)
or regex.contains(file.parse_text(.).text,
'[\x{E0020}-\x{E007E}]{10,}'
)
)
)
Playground
Test against your own EMLs or sample data.