This page explains the user agent strings used by Internet explorer:
http://msdn.microsoft.com/library/ms537503.aspx
It says that the Trident token was only introduced in IE8, so you might want to check for "MSIE" instead or as well.
There is also this page:
http://msdn.microsoft.com/en-US/library/ms537509.aspx
which is "archived and is no longer actively maintained" but does include a lot of useful information on detecting Internet Explorer.