[bugfix-517] use regex.exec instead of .match

This commit is contained in:
MathieuG-P
2024-07-17 20:35:31 +02:00
parent a6fa55719d
commit ea62f2443f
+1 -1
View File
@@ -8,6 +8,6 @@ export function findHashInString(str: string, algorithm: keyof typeof HashAlgori
const hashLength = HashAlgorithmsLengths[algorithm];
const regex = new RegExp(`[a-fA-F0-9]{${hashLength}}`, "g");
const match = str.match(regex);
const match = regex.exec(str);
return match ? match[0] : undefined;
}