This might not be enough. Older Windows versions tend to have WinNT
prefix instead. Looking for Win
only also match non-windows user agents. Also for Macintosh, search for Mac
only. Usually it is listed as Mac OS in user agents.
This is a good reg exp for Windows detection:
/Win(?:dows )?([^do]{2})\s?(\d+\.\d+)?/