Use regex to test for pdf