How to write a query for Filter by filename property in save email attachments activity

Also check this,

If(currentOffice365Message.Attachments.Any(Function(x) System.Text.RegularExpressions.Regex.IsMatch(x.Name, “.pdf$”, RegexOptions.IgnoreCase)), “.pdf”, “.xls”)