diff --git a/src/utils.js b/src/utils.js
index 67f4f4efe335cf3d400fe8ff3f6d6149753d9f62..0eadfe898121ce6f0b643d1298608012d976a0fc 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -111,8 +111,8 @@ export const readBinaryFileContent = async (file) => {
  */
 export const getPDFSignatureCount = async (file) => {
     const sigRegex = new RegExp(
-        "/Type\\s*/Sig.*?/SubFilter\\s*(/ETSI\\.CAdES\\.detached|/adbe\\.pkcs7\\.detached)",
-        "gs");
+        "/Type\\s*/Sig(.|\\s)*?/SubFilter\\s*(/ETSI\\.CAdES\\.detached|/adbe\\.pkcs7\\.detached)",
+        "g");
     const content = await readBinaryFileContent(file);
     let matches = 0;
     while (sigRegex.exec(content) !== null) {