As a follow-up to my previous email, I'm wondering the best way to determine if an email has an attachment that is a word document in filter_begin. My current thoughts were: if (re_match($entity, '\.(doc|docx).*$')) { However, this doesn't seem to work. Suggestions / Hints / Outright Answers appreciated. Regards, KAM