type.inbound
and length(filter(body.current_thread.links, .href_url.scheme != "mailto")) == 0
and length(attachments) == 0
and not subject.is_reply
and not subject.is_forward
// one line, no punctuation, cut off mid-word with "..." or "…"
// the excerpt is cut at about 160 to 200 characters and is ascii apart from the "…"
and strings.count(body.current_thread.text, "\n") == 0
and length(body.current_thread.text) >= 140
and length(body.current_thread.text) <= 210
and regex.imatch(body.current_thread.text,
'[^[:punct:]\p{P}]+[a-z](?:\.\.\.|…)\s*'
)
and not regex.icontains(body.current_thread.text, '[^\x00-\x7F…]')
// multi-word title with no punctuation; skip up to 3 leading separator characters
// that subject.base leaves behind gateway tags ("- ", "_", ": ")
and length(subject.base) >= 10
and regex.icontains(subject.base, '\w\s+\w')
and regex.imatch(subject.base, '[\s[:punct:]\p{P}]{0,3}[^[:punct:]\p{P}]+')
Playground
Test against your own EMLs or sample data.