Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Regex looks for all Mac models compatible with macOS Monterey. May not be up-to-date with newly released models.
Model information: https://support.apple.com/en-us/HT212551
Published Date: June 24, 2022
Verification: https://regex101.com/r/OozSRv/9
1) Regex matches major identifier — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
(^Mac1[34]|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).
(^Mac1[3-9]|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:
MacStudio
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
MacBook6,1
MacBook5,2
MacBook5,1
MacBook4,1
MacBook3,1
MacBook2,1
MacBook1,1
MacBook Air
https://support.apple.com/en-us/HT201862
Supported:
Mac14,2
MacBookAir10,1
MacBookAir9,1
MacBookAir8,2
MacBookAir8,1
MacBookAir7,2
MacBookAir7,2
MacBookAir7,1
Unsupported:
MacBookAir6,2
MacBookAir6,1
MacBookAir5,2
MacBookAir5,1
MacBookAir4,2
MacBookAir4,1
MacBookAir3,2
MacBookAir3,1
MacBookAir2,1
MacBookAir1,1
MacBook Pro
https://support.apple.com/en-us/HT201300
Supported:
Mac14,7
MacBookPro18,4
MacBookPro18,3
MacBookPro18,2
MacBookPro18,1
MacBookPro17,1
MacBookPro16,4
MacBookPro16,3
MacBookPro16,2
MacBookPro16,1
MacBookPro15,4
MacBookPro15,3
MacBookPro15,2
MacBookPro15,1
MacBookPro14,3
MacBookPro14,2
MacBookPro14,1
MacBookPro13,3
MacBookPro13,2
MacBookPro13,1
MacBookPro12,1
MacBookPro11,5
MacBookPro11,4
Unsupported:
MacBookPro11,3
MacBookPro11,2
MacBookPro11,1
MacBookPro10,2
MacBookPro10,1
MacBookPro9,2
MacBookPro9,1
MacBookPro8,3
MacBookPro8,2
MacBookPro8,1
MacBookPro7,1
MacBookPro6,2
MacBookPro6,1
MacBookPro5,5
MacBookPro5,4
MacBookPro5,3
MacBookPro5,2
MacBookPro5,1
MacBookPro4,1
MacBookPro3,1
MacBookPro2,2
MacBookPro2,1
MacBookPro1,2
MacBookPro1,1
https://support.apple.com/en-us/HT201894
Supported:
Macmini9,1
Macmini8,1
Macmini7,1
Unsupported:
Macmini6,2
Macmini6,1
Macmini5,3
Macmini5,2
Macmini5,1
Macmini4,1
Macmini3,1
Macmini2,1
Macmini1,1
https://support.apple.com/en-us/HT201634
Supported:
iMac21,2
iMac21,1
iMac20,2
iMac20,1
iMac19,2
iMac19,1
iMac18,3
iMac18,2
iMac18,1
iMac17,1
iMac16,2
iMac16,1
Unsupported:
iMac15,1
iMac14,4
iMac14,3
iMac14,2
iMac14,1
iMac13,2
iMac13,1
iMac12,2
iMac12,1
iMac11,3
iMac11,2
iMac11,1
iMac10,1
iMac9,1
iMac8,1
iMac7,1
iMac6,1
iMac5,2
iMac5,1
iMac4,2
iMac4,1
iMac,1
https://support.apple.com/en-us/HT210222
Supported:
iMacPro1,1
https://support.apple.com/en-us/HT202888
Supported:
MacPro7,1
MacPro6,1
Unsupported:
MacPro5,1
MacPro4,1
MacPro3,1
MacPro2,1
MacPro1,1
@mani2care
Copy link

mani2care commented Jun 30, 2022

Can we have the extension attributes for this

@kcadm
Copy link

kcadm commented Aug 26, 2022

Is there a updated version for supporting the Mac14,2 and Mac14,7 (M2 Pro and Air).

@talkingmoose
Copy link
Author

talkingmoose commented Aug 26, 2022

@kcadm Updated with latest models as posted on https://support.apple.com/en-us/HT212551. Thanks for the heads up.

@talkingmoose
Copy link
Author

talkingmoose commented Aug 26, 2022

@mani2care Not sure what extension attributes you’re needing. Jamf Pro collects this information as part of normal inventory. Use either of the two regex strings in an advanced computer search or smart computer group to identify all Monterey-compatible Macs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment