Taking a swing at the regex. How is this?
macOS 27 Golden Gate (Regex Can't upgrade)
^Mac(BookPro1(7|8),\d|(1(4,([5679]|10)|5,([36-9]|1[01])|6,[15-8]|7,[2-9]))|(1([56],1[23]|4,(2|15))|BookAir10,1)|(6,[23]|5,[45])|mini9,1|1(6,1[015])|14,(3|12)|1(3,[12]|4,1(3|4)|5,14|6,9)|14,8)$|^iMac21,[12]$