Ok, you have some PubMed abstracts. You want to filter those documents by some criteria. Because you have not provided any simple sample data and your desired output, I like others here, have no idea of how to even begin to help you.
Create the most simple example that you can showing the input and the desired output.
If you can show some Perl code, I am sure the Monks can help quite a bit on the refinement of that code.