Corrected regex to identify pdf or doc