type.inbound
and any(body.current_thread.links,
regex.icontains(.display_text, '\bRFI-\d{1,5}-\d{1,5}-\d{1,5}\b')
and not regex.icontains(.display_text,
'\bRFI-\d{2}-\d{2}-\d{4}\b',
'\bRFI-\d{4}-\d{2}-\d{2}\b'
)
)
and length(body.links) < 11
Playground
Test against your own EMLs or sample data.