I have a list of OS names that I am trying to normalize, and I'm using regex to try to match the string. Here are the variations of the string:
microsoft windows 2016
win2016
win2012
windows 2012
windows server 2012
windows server 2008 r2
windows server 2008
windows 2019
windows 2012 r2 std
win2003
windows server 2003
windows 2003
Here is my attempt (I'm very bad at regex):
(windows.*server|((win|windows)*.(2003|2008|2012|2016|2019)))
According to the link above, it is matching n2016 and not win2016, which could be problematic as the list will consist of other operating system names. Are there any improvements that could increase the accuracy of the match?