mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[bugfix-517] use regex.exec instead of .match
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user