只匹配数字

This commit is contained in:
2025-07-07 15:24:41 +08:00
parent d7fad5f9b2
commit 8ba7eab0ef

View File

@@ -508,7 +508,8 @@ function checkUpdate() {
});
}
function extractVersionNum(str) {
const match = str.match(/(\\d+\\.\\d+(?:\\.\\d+)?)/);
// 匹配第一个出现的数字版本号
const match = str.match(/(\d+\.\d+(?:\.\d+)?)/);
return match ? match[1] : '0.0.0';
}