If you've read this far and you're still not up to parsing the User Agent string, there may be another option. Depending on your needs and on your Web-server setup, someone may already have done the work for you. Here's a list of some related resources:
If your Web server supports ASP, you can use the built-in BrowsCap function. Kevin's Introduction to Active Server Pages explains how to do this. You might also want to check out cyScape to upgrade your browscap.ini, since it claims to maintain "the most comprehensive browscap.ini file available anywhere." It also offers a COM object called "BrowserHawk" that provides more accurate, full-featured browser detection.
If you're using Apache, check out the section of Arachna that shows how to do your UA parsing using SSIs.
If you don't mind doing your browser detection on the client side as an alternative to the sample offered on the previous page, you can steal all the JavaScript code you need from Netscape.
Finally, Scott Isaacs offers a couple of articles on browser detection using both client-side and server-side JavaScript. There's also an interesting article at WebCoder that promotes the concept of object detection rather than browser detection (again using JavaScript).