I do not have time to test, but I think you need something like
Code:
body :raw :regex "filename=.+\\.pdf"
Since there is no header that contains information about attachments, you need to search the message body for the incantation that identifies them. Based on experience with this kind of test, be prepared for the occasional false positive.