[macOS] Accept all kind of spaces in regexes (fixes #47)

There were two issues with the macOS regexes:

- The regexex accepted only spaces separator. But non-breakable spaces are also used from time to time. Replacing spaces by \s fixed the issue (other product regexes were also updated - never know).
- The first regex, the one that accepted major releases with no minor version, were not useful (covered by the second regex) and partly catched valid versions (such as 13.1), who was then ignored. I removed it.
This commit is contained in:
Marc Wrobel
2022-12-19 12:15:40 +01:00
committed by Nemo
parent 1efe9e035d
commit 1e45de3c58
2 changed files with 31 additions and 15 deletions

View File

@@ -1,13 +1,12 @@
{
"10": "2016-09-20",
"10.15.3": "2020-01-28",
"10.15.4": "2020-03-24",
"10.15.5": "2020-05-26",
"10.15.6": "2020-07-15",
"10.15.7": "2020-09-24",
"11": "2020-11-12",
"11.0.1": "2020-11-12",
"11.0": "2020-11-12",
"5.11": "2020-12-14",
"11.1": "2020-12-14",
"11.2": "2021-02-01",
"11.2.1": "2021-02-09",
@@ -22,7 +21,6 @@
"11.5.2": "2021-08-11",
"11.6": "2021-09-13",
"11.6.1": "2021-10-25",
"12": "2021-10-25",
"12.0.1": "2021-10-25",
"12.0": "2021-10-25",
"11.6.2": "2021-12-13",
@@ -46,6 +44,7 @@
"12.6.1": "2022-10-24",
"11.7.1": "2022-10-24",
"13.0.1": "2022-11-09",
"13.1": "2022-12-13",
"11.7.2": "2022-12-13",
"12.6.2": "2022-12-13",
"10.13.2": "2017-12-06",
@@ -64,38 +63,57 @@
"10.15.2": "2019-12-10",
"10.11.3": "2016-01-19",
"10.11.4": "2016-03-21",
"5.1": "2016-03-21",
"10.11.5": "2016-05-16",
"10.11.6": "2016-07-18",
"10.12": "2016-09-20",
"5.2": "2016-09-20",
"10.12.1": "2016-10-24",
"10.12.2": "2016-12-13",
"10.12.3": "2017-01-23",
"10.12.4": "2017-03-27",
"5.3": "2017-03-27",
"10.12.5": "2017-05-15",
"10.12.6": "2017-07-19",
"10.13": "2017-09-25",
"5.4": "2017-09-25",
"10.13.1": "2017-10-31",
"10.10.3": "2015-04-08",
"4.1": "2015-04-08",
"10.10.4": "2015-06-30",
"10.10.5": "2015-08-13",
"4.1.5": "2015-08-13",
"5.0.3": "2015-09-16",
"10.11": "2015-09-30",
"10.11.1": "2015-10-21",
"5.0.15": "2015-10-21",
"10.11.2": "2015-12-08",
"10.9.2": "2014-02-25",
"10.9.3": "2014-05-15",
"3.1.2": "2014-05-20",
"10.9.4": "2014-06-30",
"10.9.5": "2014-09-17",
"3.2.1": "2014-09-17",
"2.2.3": "2014-09-17",
"1.0": "2014-09-29",
"10.10": "2014-10-16",
"4.0": "2014-10-16",
"3.2.2": "2014-10-16",
"2.2.5": "2014-10-16",
"10.10.1": "2014-11-17",
"2.2.1": "2013-02-04",
"10.8.3": "2013-03-14",
"10.8.4": "2013-06-04",
"10.8.5": "2013-09-12",
"2.2.2": "2013-09-17",
"10.9": "2013-10-22",
"3.0": "2013-10-22",
"10.9.1": "2013-12-16",
"10.7.2": "2011-10-12",
"10.7.3": "2012-02-01",
"10.7.4": "2012-05-09",
"10.8.2": "2012-09-19",
"10.7.5": "2012-09-19",
"2.1.1": "2012-09-19",
"10.6.5": "2010-11-15"
}

View File

@@ -22,27 +22,25 @@ URLS = [
# to validate your changes
CONFIG = {
"macos": [
# This covers major releases with no minor version
r"macOS [\w ]+ (?P<version>\d{2})",
# This covers Sierra and beyond
r"macOS [\w ]+ (?P<version>\d{2}(?:\.\d+)+)",
r"macOS\s[\w\s]+\s(?P<version>\d+(?:\.\d+)*)",
# This covers Mavericks - El Capitan
r"OS X [\w ]+ v?(?P<version>\d{2}(?:\.\d+)+)",
r"OS\s+X\s[\w\s]+\sv?(?P<version>\d+(?:\.\d+)+)",
# This covers even older versions (OS X)
r"^Mac OS X [\w ]+ v?(?P<version>\d{2}(?:\.\d+)+)",
r"^Mac\s+OS\s+X\s[\w\s]+\sv?(?P<version>\d{2}(?:\.\d+)+)",
],
"ios": [
r"iOS (?P<version>\d+)",
r"iOS (?P<version>\d+(?:)(?:\.\d+)+)",
r"iPhone v?(?P<version>\d+(?:)(?:\.\d+)+)",
r"iOS\s+(?P<version>\d+)",
r"iOS\s+(?P<version>\d+(?:)(?:\.\d+)+)",
r"iPhone\s+v?(?P<version>\d+(?:)(?:\.\d+)+)",
],
"ipados": [
r"iPadOS (?P<version>\d+)",
r"iPadOS (?P<version>\d+(?:)(?:\.\d+)+)"
r"iPadOS\s+(?P<version>\d+)",
r"iPadOS\s+(?P<version>\d+(?:)(?:\.\d+)+)"
],
"watchos": [
r"watchOS (?P<version>\d+)",
r"watchOS (?P<version>\d+(?:)(?:\.\d+)+)"
r"watchOS\s+(?P<version>\d+)",
r"watchOS\s+(?P<version>\d+(?:)(?:\.\d+)+)"
],
}