Hi Richard,
For the record, we do have a function in lib/moodlelib.php called check_browser_version() which can be called as:
if (check_browser_version('MSIE') && !check_browser_version('MSIE', 9)) { // This is IE with a version number lower than 9 }
It checks for a version greater or equal to the one specified - hence, first checking for an IE match, and then checking whether it is not greater than or equal to IE9. This attempts to handle various IEisms like different browser modes for infranet sites.
Andrew