1
0
mirror of https://github.com/lancedikson/bowser synced 2025-12-04 21:52:14 +00:00

Fix regex patterns to handle alpha/beta version suffixes

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-22 22:07:22 +00:00
parent 788e65fdee
commit 09c482046c

View File

@ -290,7 +290,7 @@ const browsersList = [
const browser = {
name: 'MSNBot',
};
const version = Utils.getFirstMatch(/msnbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
const version = Utils.getFirstMatch(/msnbot\/(\d+(\.\d+)*[a-z]*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
if (version) {
browser.version = version;
@ -307,7 +307,7 @@ const browsersList = [
const browser = {
name: 'BingPreview',
};
const version = Utils.getFirstMatch(/bingpreview\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
const version = Utils.getFirstMatch(/bingpreview\/(\d+(\.\d+)*[a-z]*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
if (version) {
browser.version = version;