Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(^Mac13|MacBook(10|9)|MacBookAir(10|[7-9])|Macmini[7-9]|MacPro[6-7]|iMacPro1|iMac(1[6-9]|2[0-2])),\d|MacBookPro1(1,[45]|[2-8],\d)
/
gm
Input 1
New
Model information: https://support.apple.com/en-us/HT212551 Published Date: March 18, 2022 Verification: https://regex101.com/r/OozSRv/6 1) Regex matches major identifier — Matches major model identifier numbers based on Apple's knowledge base article (more accurate): (^Mac13|MacBook(10|9)|MacBookAir(10|[7-9])|Macmini[7-9]|MacPro[6-7]|iMacPro1|iMac(1[6-9]|2[0-2])),\d|MacBookPro1(1,[45]|[2-8],\d) 2) Regex matches current or higher — Matches model identifiers based on Apple's knowledge base article and may match higher versions before this regex is updated (more future-proof). (^Mac13|MacBook(9|\d{2})|MacBookAir([7-9]|\d{2})|Macmini([7-9]|\d{2})|MacPro([6-9]|1\d)|iMacPro[1-9]|iMac(1[6-9]|2[0-9])),\d|MacBookPro1(1,[45]|[2-9],\d) Either regex will match any of the supported following model identifiers: https://support.apple.com/en-us/HT213073 Supported: Mac13,2 Mac13,1 https://support.apple.com/en-us/HT201608 Supported: MacBook10,1 MacBook9,1 Unsupported: MacBook8,1 MacBook7,1 M
Substitution
Model information: https://support.apple.com/en-us/HT212551 Published Date: March 18, 2022 Verification: https://regex101.com/r/OozSRv/6 1) Regex matches major identifier — Matches major model identifier numbers based on Apple's knowledge base article (more accurate): (^Mac13|MacBook(10|9)|MacBookAir(10|[7-9])|Macmini[7-9]|MacPro[6-7]|iMacPro1|iMac(1[6-9]|2[0-2])),\d|MacBookPro1(1,[45]|[2-8],\d) 2) Regex matches current or higher — Matches model identifiers based on Apple's knowledge base article and may match higher versions before this regex is updated (more future-proof). (^Mac13|MacBook(9|\d{2})|MacBookAir([7-9]|\d{2})|Macmini([7-9]|\d{2})|MacPro([6-9]|1\d)|iMacPro[1-9]|iMac(1[6-9]|2[0-9])),\d|MacBookPro1(1,[45]|[2-9],\d) Either regex will match any of the supported following model identifiers: https://support.apple.com/en-us/HT213073 Supported: Mac13,2 Mac13,1 https://support.apple.com/en-us/HT201608 Supported: MacBook10,1 MacBook9,1 Unsupported: MacBook8,1 MacBook7,1 M