DOCS-1853: updated regex to prevent errors in pdfs